# EffectsApi

interface in `@dioramajs/diorama/effects`

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

The `effects` service, `app.effects`.

```ts
interface EffectsApi
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `attach` | `Attach` | Same function as `app.attach`. |
| `render` | `RenderApi \| undefined` | The renderer once ready. |
| `status` | `ReadonlySignal<EffectsStatus>` | The state of the engine. |
| `disable` | `disable(name: string): Off` | Turns an effect off everywhere without touching markup. The returned Off turns it back on. |
| `get` | `get<N extends 'curtain' \| 'horizontal' \| 'grid' \| 'coin' \| 'explode' \| 'pins' \| 'ribbon' \| 'smoke' \| 'tunnel' \| 'zoom' \| 'wave' \| 'image' \| 'gallery' \| 'model' \| 'globe' \| 'label' \| 'box' \| 'ripple' \| 'bend' \| 'reveal' \| 'parallax' \| 'ambient' \| 'hover-preview' \| 'sequence' \| 'expand' \| 'zoom-scroll' \| 'compare' \| 'lightbox' \| 'panorama' \| 'tilt' \| 'tone' \| 'flipbook' \| 'spin' \| 'glitch' \| 'pixelate' \| 'video-hover' \| 'stack' \| 'coverflow' \| 'carousel' \| 'polaroids' \| 'spotlight' \| 'scrub' \| 'chroma' \| 'liquid' \| 'flare' \| 'frost' \| 'reflection' \| 'text-reveal' \| 'scramble' \| 'marquee' \| 'video-text' \| 'split-flap' \| 'magnet' \| 'assemble' \| 'dust' \| 'text-glitch' \| 'neon' \| 'extrude' \| 'counter' \| 'shimmer' \| 'rotator' \| 'inflate' \| 'orbit' \| 'voxel' \| 'emboss' \| 'shatter' \| 'melt' \| 'unfold' \| 'blinds' \| 'physics' \| 'fire' \| 'water' \| 'keycaps' \| 'lens' \| 'prism' \| 'hologram' \| 'gradient' \| 'dots' \| 'waves' \| 'stars' \| 'blobs' \| 'clouds' \| 'device' \| 'book' \| 'hotspots' \| 'vinyl' \| 'beat' \| 'visualizer' \| 'confetti' \| 'sparkles' \| 'snow' \| 'emoji' \| 'drops' \| 'beam' \| 'glow' \| 'shine' \| 'chart' \| 'graph' \| 'heatmap' \| 'map'>(element: Element, name: N): EffectInstance<SpecFor<N>> \| undefined` | The instance of an effect on an element, if any. |
| `instances` | `instances(name?: string): readonly EffectInstance<ParamSpec>[]` | Live instances, of one effect or all. |
| `load` | `load(): Promise<boolean>` | Boots the engine now. Resolves `false` when 3D is unavailable. |
| `observe` | `observe(root: ParentNode): Off` | Observes another root such as a shadow root, and adopts the hiding stylesheet there. |
| `pin` | `pin(element: Element, source: () => number): Off` | Replaces the `pin` input of an element's layer with a 0..1 source, e.g. a ScrollTrigger's progress. Read once per frame in `layout`. Off restores the built-in formula. |
| `register` | `register(entries: EffectEntries): Off` | Adds or replaces sources. Waiting elements pick them up and replaced ones rebuild (HMR). |
| `scan` | `scan(root?: ParentNode): void` | Reconciles now, after DOM work the observer cannot see. |
| `stats` | `stats(): EffectsStats` | Counters for tests and devtools, zeros without the runtime. |
| `take` | `take(element: Element, options?: TakeOptions): Copy` | Takes an element's GL copy. Returns an inert copy ('released', ready false) without the runtime, when it is already taken, or when another app owns the element. |

Also exported from `@dioramajs/effects`.

Defined in [packages/effects/src/types.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/effects/src/types.ts#L958).
