EffectHandle interface
Calling the handle detaches it, like kernel handles.
import type { EffectHandle } from '@dioramajs/diorama'scope.onDispose(handle) ties it to a scope.
EffectHandle(): voidMembers
| Name | Type | Description |
|---|---|---|
readonly effect | string | The effect's name. |
readonly instances | readonly EffectInstance<P>[] | Live instances only, never |
readonly params | LiveParams<P> | Runtime layer for every covered instance, now and later. Accessor properties, so tweenable. |
detach | | Detaches every instance the handle covers. Same as calling it. |
loaded | | Loads the definition only, so every param gets its accessor and default. Use before tweens. |
ready | | Settles when every current instance near the viewport has left waiting and loading. |
reset | | Drops the handle's writes (all, or one param) back to attributes, attach params or defaults. |
set | | Writes several params at once, whole tuples included. |
Also exported from @dioramajs/diorama/auto, @dioramajs/diorama/effects, @dioramajs/effects.
Defined in packages/effects/src/types.ts.