# depthOf

function in `@dioramajs/model/box`

```ts
import { depthOf } from '@dioramajs/model/box'
```

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.

```ts
function depthOf(
  depth: number | 'auto',
  aspect: number,
  side?: readonly [number, number],
  top?: readonly [number, number],
): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `depth` | `number \| 'auto'` |  |
| `aspect` | `number` |  |
| `side?` | `readonly [number, number]` |  |
| `top?` | `readonly [number, number]` |  |

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