SceneRenderTree
Defined in: renderer/src/SceneRenderTree.ts:24
Scene-owned render tree. Created by SceneRenderTreeProvider when a scene
enters. Scoped DI: components resolve via this.use(SceneRenderTreeKey).
Properties
Section titled “Properties”defaultLayer
Section titled “defaultLayer”
readonlydefaultLayer:RenderLayer
Defined in: renderer/src/SceneRenderTree.ts:36
The auto-created “default” layer (order 0).
readonlyfx:EffectsHost
Defined in: renderer/src/SceneRenderTree.ts:54
Scene-scope effects host — .fx.addEffect(...) attaches a filter to the
entire per-scene root container, after layer-scope effects have composited.
Common use: scene-wide CRT, color grade, vignette. Survives until the
scene exits or the handle is .remove()d.
.fx.findEffect(definition) recovers a handle by registered definition
after save/load, when the caller-side reference went stale during
restoration.
readonlyroot:Container
Defined in: renderer/src/SceneRenderTree.ts:28
The single root container for the scene. Lives under the renderer’s
world-root container (which sits under app.stage and holds the fit
transform).
Methods
Section titled “Methods”clearMask()
Section titled “clearMask()”clearMask():
void
Defined in: renderer/src/SceneRenderTree.ts:61
Detach and destroy the scene-scope mask, if any.
Returns
Section titled “Returns”void
ensureLayer()
Section titled “ensureLayer()”ensureLayer(
def,opts?):RenderLayer
Defined in: renderer/src/SceneRenderTree.ts:43
Get an existing layer or create it from the given definition. Used by
plugins like UI that auto-provision a layer if the game didn’t declare
one explicitly. Pass { space: "screen" } so a default camera leaves
the layer fixed to the viewport (e.g. screen-space HUD).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”get(
name):RenderLayer
Defined in: renderer/src/SceneRenderTree.ts:30
Get a layer by name. Throws if not found.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”getAll()
Section titled “getAll()”getAll(): readonly
RenderLayer[]
Defined in: renderer/src/SceneRenderTree.ts:34
All layers, sorted by draw order.
Returns
Section titled “Returns”readonly RenderLayer[]
setMask()
Section titled “setMask()”setMask(
factory):MaskHandle
Defined in: renderer/src/SceneRenderTree.ts:59
Attach a scene-scope mask, replacing any existing one. Clips the entire per-scene root. Torn down on scene exit.
Parameters
Section titled “Parameters”factory
Section titled “factory”Returns
Section titled “Returns”tryGet()
Section titled “tryGet()”tryGet(
name):RenderLayer|undefined
Defined in: renderer/src/SceneRenderTree.ts:32
Get a layer by name, or undefined if not found.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”RenderLayer | undefined