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

WebRenderer3D

WebGPU 3D renderer — collects submissions and serializes to binary.

Data

API

simvx.graphics.renderer.web3d.log[source]

‘getLogger(…)’

simvx.graphics.renderer.web3d.__all__

[‘WebRenderer3D’]

class simvx.graphics.renderer.web3d.WebRenderer3D(width: int, height: int)[source]

Bases: simvx.graphics.renderer._base.Renderer

WebGPU 3D renderer — collects submissions and serializes to binary.

Initialization

begin_frame() None[source]
pre_render(cmd: Any) None[source]
render(cmd: Any) None[source]
resize(width: int, height: int) None[source]
destroy() None[source]
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]
set_materials(materials: numpy.ndarray) None[source]
set_lights(lights: numpy.ndarray) None[source]
submit_text(text: str, x: float, y: float, size: float, colour: tuple[float, float, float, float], **kwargs: Any) None[source]
submit_particles(particle_data: numpy.ndarray) None[source]
submit_light2d(**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]
register_texture(pixels: numpy.ndarray, width: int, height: int) int[source]
capture_frame() numpy.ndarray[source]
serialize_frame() bytes[source]

Group instances by mesh, build draw groups, serialize via Scene3DSerializer.

__slots__

()