@dioramajs/media/frost
Exports of @dioramajs/media/frost.
import { default, reach, Wipe } from '@dioramajs/media/frost'Functions
reach | Distance from (`x`, `y`) to the farthest corner of a `width` × `height` box, px. |
Classes
Wipe | Where the glass is wiped clear: `size` × `size` cells over the box, each 0 (fogged) to 1 (clear), y up. A stroke clears a band along the pointer's path; each step the clear areas fog back over `refog` seconds. Deterministic: the same strokes and steps give the same mask. |
Constants
default | Frosted glass over a photo, or a pane of ice over the page on `<body>` (over its box on any other element). The pointer wipes it clear and it fogs back by itself, or it clears from the pointer on hover, as it comes into view or as the page scrolls. `cover` freezes the glass from the edges and thaws it from a point. `steam` is a fogged mirror with droplets instead of ice. |