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/media/frost

Exports of @dioramajs/media/frost.

View as Markdown
On this page
import { default, reach, Wipe } from '@dioramajs/media/frost'

Functions

reachDistance from (`x`, `y`) to the farthest corner of a `width` × `height` box, px.

Classes

WipeWhere 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

defaultFrosted 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.