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

Exports of @dioramajs/text/dust.

View as Markdown
On this page
import { CALM, cellSide, default } from '@dioramajs/text/dust'

Functions

cellSideCell side of a grain for text of this size, px: finer sand for smaller text.
reachOfTypical travel of a grain for ink of this size, px.
sweepWhen each point of the text comes loose, 0..1: against `angle` from the side the wind blows to, with a smooth noise so the edge is ragged, or out from the middle for `explode`.

Constants

CALMSeconds of the fade that stands in for the dust under reduced motion.
defaultThe text turns to fine sand that the wind lifts off the page and carries away in depth, that rises like ash or that bursts into shards: scrubbed as the heading leaves the top of the viewport, once when it scrolls out, or on a click, for a message the visitor dismisses.
MAX_GRAINSMost grains at the high tier.