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

Exports of @dioramajs/text/voxel.

View as Markdown
On this page
import { default, FLAT, HOLD } from '@dioramajs/text/voxel'

Functions

spanSeconds from the trigger until the last cube has landed, and with `handoff` until the text shows.
voxelsCubes where the ink covers enough of a grid cell, coloured by the ink under them. The grid widens until they fit `max`. With `bricks`, neighbours in a row pair up into bricks, the pairs shifted by a cell on every other row like a wall. Each cube gets its place in the build wave: left to right, lower rows a little earlier, each line a little after the one above.

Constants

defaultThe heading built from small lit 3D cubes, one instanced draw of boxes coloured by the text under each grid cell. On view they tumble in from above and behind the page in a wave, land with a hop and a squash, and flatten into the real text; the pixels style keeps them. Cubes under the pointer pop out toward the viewer on springs. Once on view, scrubbed by scroll, or as voxels for the pointer only.
FLATSeconds the cubes take to flatten and cross-fade into the text.
HOLDSeconds the built heading holds before it flattens into the text.
JITTERShare of `duration` a cube may start late, at random.
MAX_CUBESMost cubes at the high tier; past it the grid widens.

Interfaces

VoxelOptions
VoxelsCubes on a grid over the glyphs of a raster.