forever components

Op Art & Moire

Twist Tunnel

26 concentric squares shrink and twist into a vanishing point with alternating brightness bands producing moire shimmer and endless-depth illusion.

canvasmedium complexityintense motion

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, loading screens, or any context needing a hypnotic geometric loop with high visual impact.

When not to

Light backgrounds (hardcoded near-black canvas). Contexts where sustained motion causes vestibular discomfort — no reduced-motion animation fallback, only a static frame.

Working with an AI agent

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

Change RINGS to 18, set BASE_TWIST to 0.35, and swap stroke colors to alternate between deep purple and white by replacing the rgb(v,v,v) strokeStyle with hsl values. 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

  • ring count (RINGS=26)
  • shrink ratio per ring (SCALE=0.86)
  • twist per ring (BASE_TWIST=0.20)
  • global twist oscillation amplitude (0.35)
  • drift speed (t*0.06)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • Float64Array corner reuse (allocation-free draw loop)
  • IIFE wrapper
  • visibility pause / stop
  • reduced-motion static frame guard
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Background color hardcoded to near-black — must edit both CSS and fillStyle to change
  • No color variant; strictly monochrome unless strokeStyle logic is replaced
  • Moire banding can cause visual discomfort for photosensitive viewers

op-arttunnelconcentricmoirecanvasgeometricloop

More Op Art & Moire components

  • Moire DriftTwo concentric ring grids drift apart with opposed phase, producing slow-shifting moire interference fringes via canvas lighter/difference compositing.
  • Bulge GridA 22x22 white line grid on black warps radially outward as an invisible lens drifts on a slow lissajous path; a faint offset twin grid creates moire shimmer.
  • Concentric Pulse26 white rings march outward from center in a ~6s loop; a second scaled field produces slow moire interference fringes on a dark background.
  • Wave ColumnsVertical B&W stripe columns undulate via detuned sine waves, creating a woven fabric ripple with a central bulge illusion and moire interference.
  • Checker WarpA black-and-white checkerboard bends around a breathing lens at the center, slowly rotating and drifting for a hypnotic op-art illusion.
  • Line Illusion64 horizontal lines kink at a center crease with differential shading, creating a breathing 3D fold illusion of two angled sheets.