forever components

Generative Geometry

Kaleidoscope

10-fold mirrored kaleidoscope of rotating polygon blobs on a deep plum background; tap/click spins the pattern and regenerates blobs.

canvasmedium complexitymoderate motionclick

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
Worth keeping? Votes steer what gets built next — sign in to cast one, free to read

When to use it

Dark-mode hero backgrounds, screensavers, generative art showcases, or any ambient loop needing hypnotic symmetry.

When not to

Light-background UIs (background hardcoded dark plum). Contexts where users need to focus on text or UI controls.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change SEG from 10 to 8 for 8-fold symmetry, shift blob hues toward teal by replacing the random hue with a range of 150+Math.random()*80, and slow rotation by changing t*0.0002 to t*0.0001. 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

  • segment count (SEG=10)
  • blob count (M=7)
  • blob angular range (a within ±0.45·ang, bouncing at ±0.55·ang — must stay inside the mirrored wedge or the blob is clipped away in every segment)
  • rotation speed (t*0.0002)
  • blob hue range (Math.random()*360)
  • blob size range (0.05+Math.random()*0.1)
  • spin impulse on click (spin+=0.4)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • IIFE wrapper
  • prefers-reduced-motion guard (static draw on reduce)
  • visibilitychange pause
  • DPR-aware canvas sizing
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Reduced-motion path draws a single static frame but still runs the rAF loop (blobs update silently)
  • Background color hardcoded in both CSS and fillRect — must change both to retheme
  • Blob hues are fully random on each init; no palette control

kaleidoscopegenerativecanvassymmetrypolygonambientloop

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.
  • Auto-MazeDepth-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.
  • 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.