forever components

Generative Geometry

Circuit Routing

Glowing green circuit traces auto-route between grid pads at 45/90 degrees with travelling light pulses; traces grow, hold, then fade in a continuous loop.

canvasheavy complexitymoderate motionpointer

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

Tech/electronics hero backgrounds, PCB or hardware product pages, dark-mode ambient displays needing a coded aesthetic.

When not to

Light-background UIs (background hardcoded dark green). Contexts where constant trace spawning competes with foreground content.

Working with an AI agent

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

Change accent color from green to amber by setting ACC='#ffb830' and updating the rgba base strings in drawPath and the pad fill to match. 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

  • accent color (ACC='#5effb8')
  • grid cell size divisor (Math.min(W,H)/26)
  • max active nets cap (16)
  • pad density (cols*rows*0.10)
  • pulse travel speed (cell*0.12)
  • trace grow speed (cell*0.16)
  • routing cadence (new trace every ~0.5 s; 12-trace pre-roll)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • IIFE wrapper
  • prefers-reduced-motion guard with static fallback
  • visibilitychange pause/resume
  • occ occupancy grid (prevents trace collisions)
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Greedy router can fail to complete long routes in dense grids, silently dropping the net
  • Background color hardcoded in CSS and canvas fill — must change both to retheme
  • No aria semantics on canvas

circuitgenerativecanvasroutinggridpulsepcbambient

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.