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

Exports of @dioramajs/text/blinds.

View as Markdown
On this page
import { cut, default, gapOf } from '@dioramajs/text/blinds'

Functions

cutCuts the panel over `lines` (and `also`, the lines of the second text): `slats` strips per line, or columns and square tiles of a like size.
gapOfSeconds between neighbouring slats: `stagger`, shrunk so a long wave starts in time.
spanOfSeconds from the trigger until the last slat lies flat.
swingA slat's turn, 0 closed to 1 open: it starts slowly, swings a few degrees past flat and settles with no speed left, so the hand-back to the DOM is still.
waveAtThe turn of every cell at `time` s after the trigger, radians: -π closed, 0 open.

Constants

defaultThe heading is printed across real 3D slats that turn to show it: closed, they make a panel in the back color; they turn one after another in a wave, catching the light and casting thin shadows on each other and on the page, until the text lies flat. Horizontal slats, vertical ones or square tiles; played once, scrubbed by the scroll or opened under the pointer. At rest the element is plain DOM text.

Interfaces

GridHow the text block is cut into slats or tiles.
LineOne line of the text: its ink band and font size, element px, y down.

Types