simvx.graphics.web_app3d¶
Client-side 3D web app runtime – runs inside Pyodide (browser WASM Python).
Like WebApp but for 3D games. Creates SceneTree + WebRenderer3D +
EngineStub and drives the full 3D scene graph in Pyodide. The JavaScript
bridge calls tick(dt) each frame and renders the returned binary data with
WebGPU (3D scene) plus the 2D overlay renderer.
Combined binary format: <u32 length_3d> <3d_frame_bytes> <2d_frame_bytes>.
Module Contents¶
Classes¶
Browser-side 3D app runtime for Pyodide. |
Data¶
API¶
- simvx.graphics.web_app3d.__all__¶
[‘WebApp3D’]
- class simvx.graphics.web_app3d.WebApp3D(width: int, height: int, physics_fps: int = 60)[source]¶
Browser-side 3D app runtime for Pyodide.
Drives SceneTree + WebRenderer3D + Draw2D. Returns combined 2D+3D binary frames.
Initialization
- property title: str¶
- property engine: simvx.graphics.web.engine_stub.EngineStub¶
Provide engine interface for nodes that access
self.app.engine.
- load_atlas(atlas_rgba: bytes, atlas_size: int, regions_json: str, font_size: int, ascender: float, descender: float, line_height: float, sdf_range: float, glyph_padding: int) None[source]¶
Reconstruct the MSDF atlas from pre-baked data (no freetype needed).