A toymaker’s bench at dusk
The Snow Globe Workshop treats the page as a room, not a catalogue. Its emotional spine is Christmas-card dusk: the blue moment when a workshop window is warmer than the street outside. The main page moves from immersive weather to cabinet, recipe, maker, anatomy, and commission ledger. Each section changes its composition while the same materials recur: cloudy glass, ruled paper, dark walnut, stamped brass, and snow-white ceramic.
Snow with a memory
In main.js, resize() seeds 1,842 flakes on larger screens and 1,050 on phones, then rescales both particles and stored snow when the dome changes size. Each flake gets a grade-linked radius and fall rate, so fine chips hang in the glycerine long after heavy chips land. During frame(), gravity, drag, pointer impulse, and one decaying curl field update every awake flake; the circular boundary reflects escapees back into the glass.
The crucial trick is accumulation, a 120-cell height field. terrainY() describes the ground and three roof profiles. When a flake reaches surfaceY(), its mass spreads across three cells and the particle sleeps. draw() traces those heights into a luminous drift edge. A tilted globe calls slideDrifts(); settleDrifts() softly equalizes neighboring piles without leaking across roof edges. updateMemoryTrace() samples that same field into the ivory record strip, while takeDriftImpression() holds a numbered snapshot long enough to feel stamped. The snow keeps its last shape, then slumps rather than resetting. Visibility changes cancel the animation frame; reduced-motion mode lowers the particle budget and initial impulse.
Glass, grain, and little weather
The globe is layered: inline SVG supplies the village, CSS inset shadows create a refractive rim, radial gradients paint the highlight, and canvas supplies the moving snow. The brass side key runs toggleLastLight(): thirty-seven SVG windows wake in sequence, one star crosses the dome, and the skater takes a final circuit before the lights remain warm. The ritual is keyboard-operable and becomes an immediate still reveal under reduced motion. Shelf globes use CSS shapes. The lighthouse gale is a repeated diagonal gradient; the desert has a clipped mesa and iron-colored particle field; the observatory combines radial stars with a drawn comet. selectScene() lifts the chosen object, rethemes the card, updates every catalog field, and stores the climate in the URL.
Atmosphere comes from low-opacity SVG turbulence embedded as a data URI, long radial light pools, walnut-grain rings, paper borders, and deliberately imperfect rotations. The load moment separates ledger, headline, copy, and globe with ledgerReveal and arrive. The blue lampworking flame is three clipped CSS shapes with offset timing; reduced motion freezes them into a still blue flame.
Palette & type tokens
Young Serif carries titles, quotations, and the maker’s romance. Baloo 2 handles labels, navigation, measurements, and readable copy. Both are served from the local font library. Tight display tracking makes titles feel printed; wide uppercase tracking makes tiny workshop labels feel engraved.
Reproduce this
Prompt an AI coding agent to create a pure HTML, CSS, and JavaScript editorial experience based on one physical craft and one impossible interactive property. Specify the exact materials, time of day, palette, local typefaces, and a real simulation rather than decorative particles. Ask for an inline SVG world under a canvas layer, pointer velocity as input, collision surfaces, persistent accumulation, tilt-driven redistribution, reduced-motion behavior, and screenshot checks at phone, tablet, and desktop widths. Then require substantial invented lore so every technical detail serves a believable maker and place.