@dioramajs/text/shatter
Exports of @dioramajs/text/shatter.
import { CALM, CAP, corners } from '@dioramajs/text/shatter'Functions
Constants
CALM | Seconds of the fade that stands in for the break under reduced motion. |
CAP | Most shards per tier. |
default | The heading breaks into 3D shards that fly apart, tumble and catch the light: thin panes of glass with the text printed on them, thick chunks of stone with rough walls and a puff of dust, or torn paper that flutters down. On a click from the point of impact, scrubbed as the heading scrolls out, as a light crack under the pointer, or assembled from flying shards once in view. At rest the element is plain DOM text. |
THICK | Thickness of a shard at depth 1, em of the font size. |