forever components

Organic & Nature

Reaction-Diffusion Coral

Gray-Scott reaction-diffusion simulation grows teal-to-coral stripe and spot patterns with glowing contour bands; pointer seeds new growth zones.

canvasheavy complexityintense 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

Ambient sci-art backgrounds, generative art demos, biology/nature-themed hero sections, creative portfolio backdrops.

When not to

Low-end devices — runs 5 simulation steps per frame on a Float32 grid; heavy on CPU. Any context requiring legible text overlaid on the canvas.

Working with an AI agent

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

Change the palette to purple-to-gold by updating the stops array: [[10,5,20],[40,10,80],[120,60,180],[255,180,50],[255,240,200]], then reduce glow intensity by setting the glow multiplier from 0.55 to 0.25. 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

  • feed/kill rates (f=0.0367, kk=0.0649) — controls spots vs stripes pattern
  • palette color stops array (stops)
  • grid resolution target (tgt=148)
  • steps per frame (s<5 loop count)
  • seed radius on pointer (r=4)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • low-res offscreen buffer canvas (critical for perf — upscaled via drawImage)
  • Float32Array double-buffer swap (a/a2, b/b2)
  • visibilitychange pause/resume
  • prefers-reduced-motion static render (900 pre-steps then paint)
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • CPU-bound: 5 Gray-Scott steps per rAF on a ~148x83 grid — sustained load on low-end devices
  • No reduced-motion fallback animation — only a single static snapshot is shown
  • Background color (#0a1418) is hardcoded in CSS; palette only maps chemical concentrations

reaction-diffusioncoralgenerativecanvasorganicsimulationbiology

More Organic & Nature components

  • Growing VineA sinuous green vine grows upward sprouting 14 alternating leaves and a pale bud tip, then retracts in a seamless loop on a dark forest background.
  • Flickering FireAdditive-blended ember particles rise from a glowing orange base, flickering like a real flame; cursor pans left/right to fan the fire sideways.
  • Water RippleConcentric ripple rings expand across a deep teal water surface with shimmering caustic bands; tap anywhere to drop a new ripple. Auto-drops periodically.
  • Lightning BoltJagged lightning bolts with branching forks strike randomly down a dark storm-sky canvas; screen flashes rust-white on each strike. Tap to trigger instantly.
  • Falling SnowUp to 110 depth-layered snowflakes drift and sway down a dark blue gradient; pointer movement shifts a wind force that nudges the entire flurry sideways.
  • Drifting CloudsPuffy white clouds with radial-gradient puffs and soft blue undersides drift across a layered sky gradient; pointer nudges them forward.