simvx.graphics.renderer.web3d¶
WebGPU 3D renderer — collects submissions and serializes to binary via Scene3DSerializer.
Implements the Renderer ABC without any Vulkan dependency. Instead of issuing GPU draw calls, it groups instances per frame and serializes them for WebSocket transmission to a browser-side WebGPU renderer.
Module Contents¶
Classes¶
WebGPU 3D renderer — collects submissions and serializes to binary. |
Data¶
API¶
- simvx.graphics.renderer.web3d.__all__¶
[‘WebRenderer3D’]
- class simvx.graphics.renderer.web3d.WebRenderer3D(width: int, height: int)[source]¶
Bases:
simvx.graphics.renderer._base.RendererWebGPU 3D renderer — collects submissions and serializes to binary.
Initialization
- submit_instance(mesh_handle: simvx.graphics._types.MeshHandle, transform: numpy.ndarray, material_id: int = 0, viewport_id: int = 0) None[source]¶
- submit_multimesh(mesh_handle: simvx.graphics._types.MeshHandle, transforms: numpy.ndarray, material_id: int = 0, material_ids: numpy.ndarray | None = None, viewport_id: int = 0, count: int = 0) None[source]¶
- submit_skinned_instance(mesh_handle: simvx.graphics._types.MeshHandle, transform: numpy.ndarray, material_id: int, joint_matrices: numpy.ndarray) None[source]¶
- submit_text(text: str, x: float, y: float, size: float, colour: tuple[float, float, float, float], **kwargs: Any) None[source]¶
- set_post_process(bloom_enabled: bool = False, bloom_threshold: float = 1.0, bloom_intensity: float = 0.8, bloom_soft_knee: float = 0.5) None[source]¶
Update post-processing settings (synced from WorldEnvironment).
- register_mesh(vertices: numpy.ndarray, indices: numpy.ndarray) simvx.graphics._types.MeshHandle[source]¶
- serialize_frame() bytes[source]¶
Group instances by mesh, build draw groups, serialize via Scene3DSerializer.
- __slots__¶
()