forever components

Op Art & Moire

Checker Warp

A black-and-white checkerboard bends around a breathing lens at the center, slowly rotating and drifting for a hypnotic op-art illusion.

canvasmedium complexitymoderate 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, op-art or retro aesthetics, ambient screensaver-style displays.

When not to

Layouts needing legible text overlays; users sensitive to optical illusions or motion; light-background designs (background hardcoded dark).

Working with an AI agent

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

Change CELL size to 20 (larger squares), slow the swell cycle by setting time*0.00025 instead of 0.00045, and tint white squares to pale amber (#f5e6c8). 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

  • checker cell size (CELL = Math.max(14, m/11))
  • lens radius (LR = m*0.42)
  • swell speed and depth (time*0.00045, 0.34 + 0.30*Math.sin)
  • rotation speed (time*0.000055)
  • checker drift speed (time*0.00018)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • Float32Array vertex cache (drawFrame._vx/_vy) for perf
  • visibilitychange pause/resume guard
  • reduced-motion static-frame fallback
  • IIFE wrapper
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Quad-fill approach means edges are straight line segments, not true smooth curves — visible at low cell counts
  • Checker drift uses floor(pshift) so the slide snaps one cell at a time rather than sliding continuously
  • Background color hardcoded in both CSS and canvas fillRect — must change in two places

op-artcheckerboardwarplenscanvasgenerativeblack-and-white

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.
  • Line Illusion64 horizontal lines kink at a center crease with differential shading, creating a breathing 3D fold illusion of two angled sheets.
  • Spiral VertigoTwo counter-rotating Archimedean spirals at near-equal pitch create shifting moire fringes and illusory depth pull on a dark background.