# EffectUpdate

type in `@dioramajs/diorama/effects`

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

Runs every frame while the instance is running and visible. Return `true` to ask for the next
frame while state kept in JavaScript still moves (a damped value, a fade, a simulation), and
`false` once it has settled. Without an `animate` option a returned boolean decides alone, so
reading `input.delta` for the motion does not draw every frame; return one on every path. With
`animate`, `true` adds frames to the policy. Returning nothing leaves it to the policy. `true`
is honoured under reduced motion too: settle at once when `input.reducedMotion` is set.

```ts
type EffectUpdate = (input: EffectInput, frame: FrameTime) => boolean | void
```

Also exported from `@dioramajs/effects`.

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