# EffectHandle

interface in `@dioramajs/diorama`

```ts
import type { EffectHandle } from '@dioramajs/diorama'
```

Calling the handle detaches it, like kernel handles. `scope.onDispose(handle)` ties it to a scope.

```ts
EffectHandle(): void
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `effect` | `string` | The effect's name. |
| `instances` | `readonly EffectInstance<P>[]` | Live instances only, never `disposed`. |
| `params` | `LiveParams<P>` | Runtime layer for every covered instance, now and later. Accessor properties, so tweenable. |
| `detach` | `detach(): void` | Detaches every instance the handle covers. Same as calling it. |
| `loaded` | `loaded(): Promise<boolean>` | Loads the definition only, so every param gets its accessor and default. Use before tweens. |
| `ready` | `ready(): Promise<void>` | Settles when every current instance near the viewport has left waiting and loading. |
| `reset` | `reset(param?: keyof P & string): void` | Drops the handle's writes (all, or one param) back to attributes, attach params or defaults. |
| `set` | `set(values: Partial<ParamsOf<P>>): void` | 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](https://github.com/MasterKurosava/diorama/blob/main/packages/effects/src/types.ts#L764).
