Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

layout function

The pieces of a file and their offsets at `spread: 1`.

View as Markdown
import { layout } from '@dioramajs/model/explode'

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.

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

Parameters

NameTypeDescription
fileObject3D
mode'radial' | 'axis' | 'extras'
namesreadonly string[]
axis?readonly [number, number, number]

Default ....

Defined in packages/model/src/explode.ts.