# Rig

interface in `@dioramajs/diorama/model/rig`

```ts
import type { Rig } from '@dioramajs/diorama/model/rig'
```

The placed model of an element, as `model` publishes it.

```ts
interface Rig
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `box` | `{ readonly height: number; readonly width: number; readonly x: number; readonly y: number }` | The model element's box this frame, viewport px. |
| `file` | `Object3D` | The file's scene, whose coordinates the markup uses. |
| `pivot` | `Group` | The group `model` turns. Its rotation is the pose, drag, spin, scroll turn and tilt. |
| `root` | `Object3D` | The model's layer root, at the centre of its box. |
| `scene` | `Group` | The normalised wrapper from `ctx.model`: the file's scene is its only child. |
| `contain` | `contain(boxes: readonly Box3[] \| undefined): void` | Bounds of parts in the file's coordinates to fit in the box and centre on the pivot instead of the file's own, as parts move apart; undefined goes back to the file's bounds. |
| `face` | `face(yaw: number, pitch: number): void` | Turns the model so that this yaw and pitch (radians, the model's own rotation) face the viewer: through the same easing as the arrow keys, at once under reduced motion. Pitch is held to the model's limit. |
| `invalidate` | `invalidate(): void` | Requests a frame of the element's layer. |

Also exported from `@dioramajs/model/rig`.

Defined in [packages/model/src/rig.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/model/src/rig.ts#L5).
