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/smoke

Exports of @dioramajs/text/smoke.

View as Markdown
On this page
import { condense, default, LOOP_FPS } from '@dioramajs/text/smoke'

Functions

condenseHow far a view-trigger condense is at `k` 0..1: the smoke gathers fast and the letters sharpen slowly.
scrubThe stage of a scrubbed heading, 0 condensed to 1 gone, and where its smoke goes: 1 up and away as it leaves the top, -1 drifting in from below as it comes up. `start` is the middle of the box on the page's first screen, so a heading there starts condensed.
smokeColorThe smoke color of a style: `color` if it is one, else grey white, a pale fog or the ink.

Constants

defaultA heading condenses out of drifting smoke as it comes into view, or dissolves into it: a short march through a volume of smoke shaped by the glyphs, swirled by 3D noise and rising over time, lit from behind so thin wisps glow at their edges. The volume has depth, so its layers shift against each other as the page scrolls. The text stays in the DOM.
LOOP_FPSFrames a second of the loop trigger.
STEPSSteps through the volume per quality tier, half in front of the letters and half behind.