Skip to content

Scene3DRendererOptions

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

Scene3DRenderer options: which entities to draw, how to build an object for one, and how to update it.

TObject

TRow extends unknown[]

create: (entry, world) => TObject

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

Builds the object for an entity on the first frame it is selected. Owned geometry and materials stay the caller’s to dispose.

[EntityId, ...TRow[]]

EcsWorld

TObject


optional remove?: (object, entityId, world) => void

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

Called once per object right after it is removed from the graph — when its entity leaves the selection, and for every held object on Scene3DRenderer.dispose. Release or recycle what create built (geometries, materials, pooled meshes) here. world is the one passed to the most recent render.

TObject

EntityId

EcsWorld

void


select: (world) => Iterable<[EntityId, ...TRow[]]>

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

Builds the selection this pass draws — typically world.query(...) narrowed with .withTag(...) / .without(...). Called once per world: the returned iterable is iterated again every frame, so it must reflect the world’s current state on each iteration, as a query does. An entity absent from an iteration has its object removed from the graph.

EcsWorld

Iterable<[EntityId, ...TRow[]]>


optional sync?: (object, entry, world) => void

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

Updates an entity’s object every frame it is selected, including the frame it was created.

TObject

[EntityId, ...TRow[]]

EcsWorld

void