Rig interface
The placed model of an element, as `model` publishes it.
import type { Rig } from '@dioramajs/diorama/model/rig'interface RigMembers
| Name | Type | Description |
|---|---|---|
readonly box | { readonly height: number; readonly width: number; readonly x: number; readonly y: number } | The model element's box this frame, viewport px. |
readonly file | Object3D | The file's scene, whose coordinates the markup uses. |
readonly pivot | Group | The group |
readonly root | Object3D | The model's layer root, at the centre of its box. |
readonly scene | Group | The normalised wrapper from |
contain | | 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 | | 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 | | Requests a frame of the element's layer. |
Also exported from @dioramajs/model/rig.
Defined in packages/model/src/rig.ts.