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

Piece interface

A flat region of a word moved into 3D: a point (x, y) of the region, y down, lands at `origin + ax * x - ay * y` in the element's frame (origin at its top left, y up, z towards the viewer).

View as Markdown
import type { Piece } from '@dioramajs/text/rotator'

.

interface Piece

Members

NameTypeDescription
readonly axVec3
readonly ayVec3
readonly opacitynumber
readonly originVec3
readonly rectreadonly [number, number, number, number]

The region in element px, y down: x0, y0, x1, y1.

readonly shadenumber

Extra light on top of the shading: a shadow below 1.

readonly wordWord

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