Skip to content

SceneRenderTreeProviderImpl

Defined in: renderer/src/SceneRenderTreeProvider.ts:112

Materializes a per-scene render tree with one root container per scene, added as a direct child of the renderer plugin’s _worldRoot container (which itself sits under app.stage, but holds the fit transform — see RendererPlugin._worldRoot for the rationale). Registered under SceneRenderTreeProviderKey by the renderer plugin.

app.stage // identity
└── _worldRoot // fit transform lives here
├── scene A root
│ ├── layer "bg" (order -10)
│ ├── layer "world" (order 0)
│ └── layer "hud" (order 100)
└── scene B root
└── ...

new SceneRenderTreeProviderImpl(stage, processSystem?): SceneRenderTreeProviderImpl

Defined in: renderer/src/SceneRenderTreeProvider.ts:115

Container

ProcessSystem

SceneRenderTreeProviderImpl

allTrees(): IterableIterator<[Scene, SceneRenderTree]>

Defined in: renderer/src/SceneRenderTreeProvider.ts:173

Iterate every live scene/tree pair.

IterableIterator<[Scene, SceneRenderTree]>

SceneRenderTreeProvider.allTrees


applyTransparentBelow(stack): void

Defined in: renderer/src/SceneRenderTreeProvider.ts:198

Internal

Hide below-stack scene trees whose top neighbour has transparentBelow = false. The topmost scene is always visible; below neighbours stay visible only while every scene above them is transparentBelow = true. Detached scenes (mounted via _mountDetached, e.g. the debug overlay) are not in the stack and their visibility is left alone.

readonly Scene[]

void


bringSceneToFront(scene): void

Defined in: renderer/src/SceneRenderTreeProvider.ts:179

Reorder the scene’s container to render on top of its root peers.

Scene

void

SceneRenderTreeProvider.bringSceneToFront


createForScene(scene): SceneRenderTree

Defined in: renderer/src/SceneRenderTreeProvider.ts:120

Scene

SceneRenderTree

SceneRenderTreeProvider.createForScene


destroyAll(): void

Defined in: renderer/src/SceneRenderTreeProvider.ts:226

Destroy every tracked scene’s tree. Used on renderer shutdown.

void


destroyForScene(scene): void

Defined in: renderer/src/SceneRenderTreeProvider.ts:152

Scene

void

SceneRenderTreeProvider.destroyForScene


getTree(scene): SceneRenderTree | undefined

Defined in: renderer/src/SceneRenderTreeProvider.ts:169

Look up the render tree for a given scene.

Scene

SceneRenderTree | undefined

SceneRenderTreeProvider.getTree


resetVisibility(stack): void

Defined in: renderer/src/SceneRenderTreeProvider.ts:218

Internal

Restore in-stack scene roots to visible. Used while a scene transition runs so both the outgoing and incoming scenes can render even when the new topmost scene has transparentBelow = false; the visibility chain is reapplied when the transition ends. Detached scenes (mounted via _mountDetached, e.g. the debug overlay) are left alone — same contract as applyTransparentBelow, so callers can hide a detached root without it being silently un-hidden on every transition start.

readonly Scene[]

void


restoreAll(snap): void

Defined in: renderer/src/SceneRenderTreeProvider.ts:279

Internal

Apply a serializeAll() snapshot onto the live trees. Matches each entry to a live tree by Scene.name in stack order, so two snapshot entries with the same name map to two same-named live trees in the order they were pushed (snapshots are also serialized in stack order). Entries with no matching scene live are skipped with a warning.

SceneTreesSnapshot

void


serializeAll(): SceneTreesSnapshot

Defined in: renderer/src/SceneRenderTreeProvider.ts:238

Internal

Capture the layer/scene-scope effect + mask state across every live scene. Each entry records its scene’s name so restore matches by name (insensitive to push order or extra scenes pushed at runtime).

SceneTreesSnapshot