fitOf function
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.
import { fitOf } from '@dioramajs/model/device'.
function fitOf(
built: Built,
pose: readonly [number, number],
width: number,
height: number,
distance: number,
): FitParameters
| Name | Type | Description |
|---|---|---|
built | Built | |
pose | readonly [number, number] | |
width | number | |
height | number | |
distance | number |
Defined in packages/model/src/device.ts.