# layout

function in `@dioramajs/model/explode`

```ts
import { layout } from '@dioramajs/model/explode'
```

The pieces of a file and their offsets at `spread: 1`. `radial` moves each from the centre by
its own distance; `axis` spreads levels along the axis evenly over one model size; `extras`
takes `extras.explode = [x, y, z]` of the glTF nodes, in file units.

```ts
function layout(
  file: Object3D,
  mode: 'radial' | 'axis' | 'extras',
  names: readonly string[],
  axis?: readonly [number, number, number],
): { missing: string[]; pieces: Piece[]; still: Box3[]; whole: Box3 }
```

| Parameter | Type | Description |
| --- | --- | --- |
| `file` | `Object3D` |  |
| `mode` | `'radial' \| 'axis' \| 'extras'` |  |
| `names` | `readonly string[]` |  |
| `axis?` | `readonly [number, number, number]` |  |

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