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

@dioramajs/text/assemble

Exports of @dioramajs/text/assemble.

View as Markdown
On this page
import { default, FADE, JITTER } from '@dioramajs/text/assemble'

Functions

spanSeconds from the trigger until the text has landed, and with `crisp` until the glyphs show.
startsWhere each particle starts in 3D, as an offset from its place: in a cloud around and behind the text, rising from below, out of a point deep behind its middle, or from both sides. Paths bend by a smooth field, so particles that land close stream alike. `depth` is the camera distance.

Constants

defaultThousands of particles fly out of the depth around the page along curved paths, with real perspective and focus, and settle into the shape of the text; the crisp text fades in over them as each letter lands. Once on view, scrubbed by scroll, or as a heading of beads the pointer lifts towards the viewer. At rest the element is plain DOM text, except with the hover trigger.
FADESeconds the crisp glyphs take to fade in over the landed particles of a letter.
JITTERShare of `duration` a particle may start after the first of its letter.
MAX_POINTSMost particles at the high tier.

Interfaces

StartsWhere the particles start and how they turn on the way.