EffectsHost
Defined in: renderer/src/effects/EffectsHost.ts:23
Per-attachment-site holder for an EffectStack. Every scope (component,
layer, scene, screen) carries its own EffectsHost exposed as .fx, so
the user-facing API for adding / finding / fading effects is identical
regardless of where the effect lives.
The underlying EffectStack is built lazily on first addEffect so sites
that never use effects pay zero cost.
getContainer is a thunk because some sites (component scope) wire the
host at construction time but the underlying display object may itself be
created in the same constructor — the thunk removes “is this stable yet?”
thinking. makeQueue is optional because some test setups omit a
ProcessSystem; calling addEffect then throws a clear error.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new EffectsHost(
getContainer,scope,makeQueue):EffectsHost
Defined in: renderer/src/effects/EffectsHost.ts:26
Parameters
Section titled “Parameters”getContainer
Section titled “getContainer”() => DisplayContainer
makeQueue
Section titled “makeQueue”(() => ScopedProcessQueue) | undefined
Returns
Section titled “Returns”EffectsHost
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get size():
number
Defined in: renderer/src/effects/EffectsHost.ts:51
Number of attached effects on this host.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”addEffect()
Section titled “addEffect()”addEffect<
H>(factory):H
Defined in: renderer/src/effects/EffectsHost.ts:36
Attach a visual effect. Returns a typed handle for fading, removal, intensity, and any per-effect extras the factory exposes.
Type Parameters
Section titled “Type Parameters”H extends EffectHandle
Parameters
Section titled “Parameters”factory
Section titled “factory”Returns
Section titled “Returns”H
destroy()
Section titled “destroy()”destroy():
void
Defined in: renderer/src/effects/EffectsHost.ts:60
Internal
— torn down by the owning site (component/layer/scene/screen) before its container is destroyed, so user-assigned external filters survive the EffectStack teardown.
Returns
Section titled “Returns”void
findEffect()
Section titled “findEffect()”findEffect<
H,O>(definition):H|null
Defined in: renderer/src/effects/EffectsHost.ts:44
Recover the handle for the first effect attached here whose underlying
definition is definition. Returns null if no match exists.
Type Parameters
Section titled “Type Parameters”H extends EffectHandle
O
Parameters
Section titled “Parameters”definition
Section titled “definition”EffectDefinition<H, O>
Returns
Section titled “Returns”H | null
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/renderer.md.