@dioramajs/text/dust
Exports of @dioramajs/text/dust.
import { CALM, cellSide, default } from '@dioramajs/text/dust'Functions
cellSide | Cell side of a grain for text of this size, px: finer sand for smaller text. |
reachOf | Typical travel of a grain for ink of this size, px. |
sweep | When 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
CALM | Seconds of the fade that stands in for the dust under reduced motion. |
default | The 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_GRAINS | Most grains at the high tier. |