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

build function

The box of a `width` × 1 front and `depth`, its faces in `faces`, bare board in `inside`.

View as Markdown
import { build } from '@dioramajs/model/box'

flap: the top on a hinge at its back edge; lift: a lid over the top LID of the box; drawer: a sleeve with a tray that slides out to the right.

function build(
  width: number,
  depth: number,
  motion: Motion,
  faces: Readonly<Record<FaceName, Material>>,
  inside: Material,
): Built

Parameters

NameTypeDescription
widthnumber
depthnumber
motionMotion
facesReadonly<Record<FaceName, Material>>
insideMaterial

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