depthOf function
Depth of the box in front heights for a front `aspect` (width over height): `depth` times the width when a number (0 is a flat card), else from the aspect of a side picture (its width is the depth), else of a top one (its height is the depth), else a third of the width.
import { depthOf } from '@dioramajs/model/box'.
function depthOf(
depth: number | 'auto',
aspect: number,
side?: readonly [number, number],
top?: readonly [number, number],
): numberParameters
| Name | Type | Description |
|---|---|---|
depth | number | 'auto' | |
aspect | number | |
side? | readonly [number, number] | |
top? | readonly [number, number] |
Defined in packages/model/src/box.ts.