Generative Geometry
Auto-Maze
Depth-first maze carves itself wall by wall on a dark grid with shifting hue; a bright dot marks the active cell. Resets with a new color on completion.
canvasmedium complexitymoderate motionclick
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
When to use it
Generative art backgrounds, loading screens, or algorithm visualization demos that benefit from a hypnotic self-drawing pattern.
When not to
Contexts requiring legible text overlays or low-end mobile — continuous rAF loop with full redraw each frame consumes moderate CPU.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change cell size by setting the divisor from 16 to 12 in `cell=Math.max(10,Math.round(s/16))`, and shift starting hue to purple via `hue=270`. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.
Safe to edit
- cell size divisor (s/16)
- starting hue (hue=150)
- hue rotation on reset (hue+47)
- carve step interval (stepT=28)
- pause after completion (doneT>1400)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard (static full-maze fallback)
- visibilitychange pause/resume
- DPR-aware canvas sizing
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Grid is always square — non-square viewports leave margins on the longer axis
- Reduced-motion shows only a static fully-carved maze, no animated fallback
More Generative Geometry components
- Voronoi Shatter14 drifting sites partition the canvas into cool-blue Voronoi mosaic cells; moving the pointer nudges the nearest site toward the cursor.
- Truchet Tiles8x8 grid of rainbow quarter-arc Truchet tiles that flip orientation in slow sine waves, weaving shifting interlocked curves across a dark background.
- SpirographA hypotrochoid spirograph traced progressively on canvas with a shifting hue; each cycle completes then resets with new random radii and color.
- L-System PlantAn L-system fractal plant grows branch by branch from the canvas bottom, swaying gently; clicking triggers a wobble and regrows a randomized plant.
- Rotating Mandala12-fold mandala of 5 nested polygon rings that counter-spin, breathe in scale, and cycle through lilac-gold hues. Tap adds a spin impulse.
- Moiré InterferenceThree drifting concentric ring sets in cyan, pink, and green blend additively to create shifting moiré patterns. Pointer steers one ring center.