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

view function

How a box of `width` x `height` px sees its depth when its face is turned up by `ax` and right by `ay` (radians): the point the depth vanishes toward, in box px (y down), and the share of the way there a point at full depth goes.

View as Markdown
import { view } from '@dioramajs/text/extrude'

. At rest the back trails depth px away from the light at the box centre; turning the face toward a point moves the back away from it.

function view(
  light: number,
  depth: number,
  ax: number,
  ay: number,
  width: number,
  height: number,
  out?: Vector3,
): Vector3

Parameters

NameTypeDescription
lightnumber
depthnumber
axnumber
aynumber
widthnumber
heightnumber
out?Vector3

Default ....

Defined in packages/text/src/extrude.ts.