Skip to content

EffectStack

Defined in: renderer/src/effects/EffectStack.ts:38

Internal

Internal: a list of attached effects bound to one pixi Container.

  • Coexists with external displayObject.filters assignments. The stack tracks the filter instances it owns; any other filter present on the target at sync time is treated as external and preserved (placed before the stack’s owned filters in the chain, so user filters render first and stack effects composite on top).
  • fadeIn / fadeOut are implemented via Tween.custom, scheduled on the supplied ScopedProcessQueue. Per-effect processes are tracked so handle.remove() cancels in-flight fades for that effect rather than letting them keep firing setIntensity after detach.

new EffectStack(displayObject, queue, scope): EffectStack

Defined in: renderer/src/effects/EffectStack.ts:46

DisplayContainer

ScopedProcessQueue

EffectScope

EffectStack

get size(): number

Defined in: renderer/src/effects/EffectStack.ts:148

Number of attached effects.

number

add<H>(factory): H

Defined in: renderer/src/effects/EffectStack.ts:53

Build and attach an effect, returning its handle.

H extends EffectHandle

EffectFactory<H>

H


destroy(): void

Defined in: renderer/src/effects/EffectStack.ts:171

Tear down every attached effect and cancel any in-flight tweens.

void


findHandle(definitionName): EffectHandle | undefined

Defined in: renderer/src/effects/EffectStack.ts:160

Find the handle for the first effect in the stack built from a defineEffect definition with the given name.

Returns undefined if no matching entry exists. If the stack holds multiple entries with the same definition name, the first one encountered (insertion order) is returned.

string

EffectHandle | undefined

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.