forever components

Op Art & Moire

Bulge Grid

A 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.

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

Op-art hero backgrounds, creative portfolios, generative art showcases, or any context wanting ambient perceptual illusion without user interaction.

When not to

Content-heavy layouts where grid motion competes with text, or light-background UIs (background hardcoded dark near-black).

Working with an AI agent

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

Change grid resolution to N=30 for a denser weave, reduce bulge radius to Math.min(W,H)*0.22, and tint lines to a warm amber (#ffb347) instead of white. 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

  • grid density (N=22)
  • bulge radius (R = min*0.34)
  • lens drift amplitude (min*0.10)
  • bulge breathe speed (t*0.9)
  • moire offset translate (0.9, 0.9)
  • line color (#fff)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • DPR-aware canvas sizing
  • visibilitychange pause/resume
  • prefers-reduced-motion single-frame fallback
  • IIFE wrapper
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Grid warps only within the circular lens region — outside is always a flat regular grid
  • Moire effect is subtle and may not be visible on low-contrast displays

op-artgriddistortionmoirecanvaslissajousgenerative

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.
  • 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.
  • Spiral VertigoTwo counter-rotating Archimedean spirals at near-equal pitch create shifting moire fringes and illusory depth pull on a dark background.