Skip to content

EffectHandle

Defined in: renderer/src/effects/EffectHandle.ts:11

The runtime handle returned by addEffect. Lets the caller toggle, remove, or fade an effect without tracking its slot in the underlying pixi filters array.

Effect factories may return a richer handle that extends this — see each factory’s typed return for extras like setIntensity or trigger.

readonly enabled: boolean

Defined in: renderer/src/effects/EffectHandle.ts:17

Whether the effect is currently enabled.

fadeIn(duration): Process

Defined in: renderer/src/effects/EffectHandle.ts:19

Tween the effect’s primary intensity 0 → 1 over duration ms.

number

Process


fadeOut(duration): Process

Defined in: renderer/src/effects/EffectHandle.ts:21

Tween the effect’s primary intensity → 0 over duration ms.

number

Process


remove(): void

Defined in: renderer/src/effects/EffectHandle.ts:13

Remove the effect immediately. Idempotent.

void


run(p): Process

Defined in: renderer/src/effects/EffectHandle.ts:33

Schedule a Process scoped to this effect’s lifetime. The process is routed through the same ScopedProcessQueue the effect’s fades use — pauses with the owning scene, time-scales with it, and is cancelled automatically when the effect is removed.

Useful for factories that need timed work (e.g. a one-shot trigger ramp, a uniform animator) without asking the caller to wire step(dt). The returned Process can be cancelled early; otherwise it tears down with the effect.

Process

Process


setEnabled(on): void

Defined in: renderer/src/effects/EffectHandle.ts:15

Toggle the effect without removing it. Flips the underlying filter’s .enabled.

boolean

void