Web Visualizer

DSNS Web Visualizer: browser-based 3D satellite network visualizer.

Runs the full Python simulation inside Pyodide (WebAssembly) and renders via Three.js in the browser.

class dsns.web_visualizer.WebRunner(preset: str = 'walker', time_scale: float = 100.0, space_scale: float = 1e-06, interplanetary_scale: float = 1e-10, sat_color: tuple[float, float, float] = (1.0, 0.0, 0.0), isl_color: tuple[float, float, float] = (0.0, 1.0, 0.0), ill_color: tuple[float, float, float] = (1.0, 0.0, 1.0))

Runner that builds a preset simulation and exposes step(t).

__init__(preset: str = 'walker', time_scale: float = 100.0, space_scale: float = 1e-06, interplanetary_scale: float = 1e-10, sat_color: tuple[float, float, float] = (1.0, 0.0, 0.0), isl_color: tuple[float, float, float] = (0.0, 1.0, 0.0), ill_color: tuple[float, float, float] = (1.0, 0.0, 1.0))
step(t: float) dict

Advance the simulation to time t and return serializable state. All bulk data is written into pre-allocated flat buffers.

Web visualizer runner, executes inside Pyodide. Builds a simulation preset and exposes a step(t) function that returns serializable state for the Three.js renderer.

Performance design:

  • All bulk data is returned as flat numpy typed arrays (float32 / int32). Pyodide shares these with JS as zero-copy Float32Array / Int32Array views.

  • The return dict and all buffers are pre-allocated once and reused.

  • No per-step Python list allocations for positions, links, or planet data.

class dsns.web_visualizer.runner.WebRunner(preset: str = 'walker', time_scale: float = 100.0, space_scale: float = 1e-06, interplanetary_scale: float = 1e-10, sat_color: tuple[float, float, float] = (1.0, 0.0, 0.0), isl_color: tuple[float, float, float] = (0.0, 1.0, 0.0), ill_color: tuple[float, float, float] = (1.0, 0.0, 1.0))

Runner that builds a preset simulation and exposes step(t).

__init__(preset: str = 'walker', time_scale: float = 100.0, space_scale: float = 1e-06, interplanetary_scale: float = 1e-10, sat_color: tuple[float, float, float] = (1.0, 0.0, 0.0), isl_color: tuple[float, float, float] = (0.0, 1.0, 0.0), ill_color: tuple[float, float, float] = (1.0, 0.0, 1.0))
step(t: float) dict

Advance the simulation to time t and return serializable state. All bulk data is written into pre-allocated flat buffers.