No.212 · Backgrounds
Glyph Swell
A quiet grid of monospaced marks where swells start from your pointer and travel outward as rings, lifting each cell through denser glyphs and brighter ink as they pass. Left alone, slow swells start from random cells.
The prompt
Written for the variant you picked above: Terminal
Build a canvas 2D background of monospaced glyphs on a 15px grid. Pre-render a glyph atlas once (and again when the mono font finishes loading): each mark of a quiet-to-loud ramp ('·:-+=*#') drawn in the ink colour on one row and the crest colour on another, at device resolution. Every frame, compute each cell's value: a low murmur (two small sines in cell coordinates and time) plus every live swell's contribution — a Gaussian band at radius age × 17 cells (width ~2.8 cells), decaying with age (e^−0.55·age) and gently with distance. The value picks the glyph (value × ramp length) and its alpha (0.2 + value × 1.15); above 0.8 the crest colour is used. Skip cells below a threshold, and draw the rest with drawImage from the vitrine. A new swell starts whenever the pointer reaches a new cell (at most every 140ms, amplitude 0.8), a click starts a big one (1.6), and when nobody is touching it a slow swell starts at a random cell every ~1.9s. Swells are dropped after 6s. Run at ~40fps (30 on touch), stop requesting frames offscreen or in hidden tabs, and draw one frame mid-swell under reduced motion. Colours are a prop [background, ink, crest]. Selected variant — Terminal (terminal): Colours [#07090a, #9fe6b0, #e9fff0]: green glyphs on black with near-white crests, like a terminal. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Move the pointer to start swells from where it is; click or tap for a big one. Motion: Rings travel at 17 cells/s and fade over ~5s; idle swells every ~1.9s; ~40fps. Accessibility: The canvas is aria-hidden and decorative. Reduced motion draws one still frame. Responsive behavior: Cells stay 15px (13px on touch); the grid follows the container. Touch: Tap to start a swell; idle swells keep it alive. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
Notes
- Interaction
- Move the pointer to start swells from where it is; click or tap for a big one.
- Motion
- Rings travel at 17 cells/s and fade over ~5s; idle swells every ~1.9s; ~40fps.
- Accessibility
- The canvas is aria-hidden and decorative. Reduced motion draws one still frame.
- Responsive
- Cells stay 15px (13px on touch); the grid follows the container.
- On touch
- Tap to start a swell; idle swells keep it alive.