# InputUniforms

interface in `@dioramajs/diorama/effects`

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

Built-in inputs as TSL uniforms. Each one is created on first access and only then updated.

```ts
interface InputUniforms
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `hover` | `UniformNode<'float'>` | Damped 0..1 while the pointer is over the box. 0 under reduced motion. |
| `hoverTime` | `UniformNode<'float'>` | Seconds that run while hovered or while `hover` decays, frozen at rest and under reduced motion. Reading it implies `animate: 'hover'`. |
| `motion` | `UniformNode<'float'>` | 1 normally, 0 under prefers-reduced-motion. Handy as a multiplier. |
| `opacity` | `UniformNode<'float'>` | CSS opacity of the element and its ancestors, times the copy's opacity and presence while taken. The surface applies it and `ctx.mask()` includes it. |
| `pin` | `UniformNode<'float'>` | 0 when the top reaches the viewport top, 1 when the bottom reaches the viewport bottom. |
| `pointer` | `UniformNode<'vec2'>` | Pointer in element UV, y up like `uv()`. 0..1 inside the box, not clamped outside. |
| `pointerWorld` | `UniformNode<'vec2'>` | Pointer in world px on the z = 0 plane. Viewport centre is 0,0, y up. |
| `presence` | `UniformNode<'float'>` | 1 at rest, 0..1 while the copy enters or leaves a page. |
| `progress` | `UniformNode<'float'>` | 0 as the top enters at the bottom of the viewport, 1 as the bottom leaves at the top. |
| `size` | `UniformNode<'vec2'>` | Box size in CSS px. |
| `time` | `UniformNode<'float'>` | Seconds that advance only while visible. Frozen under reduced motion. |
| `velocity` | `UniformNode<'float'>` | Scroll velocity in -1..1 (3000 px/s is 1), positive scrolling down. 0 under reduced motion. |

Also exported from `@dioramajs/effects`.

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