# fitOf

function in `@dioramajs/model/device`

```ts
import { fitOf } from '@dioramajs/model/device'
```

Px per unit that fits the device in the box in its rest pose, and the shift that centres it:
the corners of its parts turned by pitch and yaw, each grown by the perspective of its depth
seen from `distance` px.

```ts
function fitOf(
  built: Built,
  pose: readonly [number, number],
  width: number,
  height: number,
  distance: number,
): Fit
```

| Parameter | Type | Description |
| --- | --- | --- |
| `built` | `Built` |  |
| `pose` | `readonly [number, number]` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `distance` | `number` |  |

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