Skip to content

Scene3DRenderer

Defined in: src/modules/render-scene3d/render-scene3d.ts:53

A Renderer that keeps one scene-graph object per selected entity: created on first selection, synced every frame, and removed from the graph once the entity stops matching. Generic over the object type — pass a three.js Scene as the graph and build Mesh / Sprite objects in create.

It owns existence only. Drawing the scene, the camera, the canvas and GPU resources stay with the caller. Entity ids restart after world.clearAll() or world.loadJSON(...); call dispose then, so a reused id is not matched to the previous entity’s object.

TObject

TRow extends unknown[] = unknown[]

new Scene3DRenderer<TObject, TRow>(options): Scene3DRenderer<TObject, TRow>

Defined in: src/modules/render-scene3d/render-scene3d.ts:61

Scene3DRendererOptions<TObject, TRow>

Scene3DRenderer<TObject, TRow>

dispose(graph): void

Defined in: src/modules/render-scene3d/render-scene3d.ts:69

Remove every tracked object from graph (calling the remove option for each) and forget it; the next render recreates what is still selected.

SceneGraph<TObject>

void


get(entityId): TObject | undefined

Defined in: src/modules/render-scene3d/render-scene3d.ts:83

The object this pass currently holds for entityId, if the entity was selected on the last render.

EntityId

TObject | undefined


render(__namedParameters): void

Defined in: src/modules/render-scene3d/render-scene3d.ts:87

Scene3DRenderContext<TObject>

void

Renderer.render