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

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.

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

.

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

Parameters

NameTypeDescription
depthnumber | 'auto'
aspectnumber
side?readonly [number, number]
top?readonly [number, number]

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