forever components

Particles & Physics

Strange Attractor Swarm

560 hot-pink particles trace the Aizawa strange attractor in 3D, glowing with additive blend; pointer spins the view and boosts simulation speed.

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

Dark-mode hero backgrounds, generative art displays, math/science visualizations needing ambient complexity.

When not to

Low-end mobile (per-frame N-body loop at 560 particles). Light backgrounds — hardcoded dark purple canvas.

Working with an AI agent

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

Change particle count from N=560 to N=300, shift color ramp to cyan (set cr2=0, cg=200, cb=255), and slow rotation by changing rot+=0.0016 to rot+=0.0008. 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

  • particle count (N=560)
  • attractor params (A,B,C,D,E,F)
  • rotation speed (rot += 0.0016)
  • color ramp (cr2, cg, cb expressions)
  • perspective strength (1.7/(1.7+tz+1.3))
  • time step (DT=0.0085)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

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

Known limitations

  • CPU-bound per-frame velocity loop — can drop frames on low-end devices at full particle count
  • Background color hardcoded in CSS (#120010) — must edit to change dark purple
  • Reduced-motion path uses MORE particles (900) than the animated path (560) for a denser static frame — may confuse future editors

attractorparticlescanvasphysicsgenerativemagenta3d-projection

More Particles & Physics components

  • Gravity Dot RainMulticolored dots fall under gravity with motion trails, bounce off the floor, and scatter away from the cursor on a dark navy canvas.
  • Firework BurstColorful glowing sparks burst radially, fall under gravity, and fade against a dark sky. Auto-launches bursts; click anywhere to add more.
  • Confetti CannonColored rectangles fire from bottom corners in auto-cycling bursts, tumbling with gravity and flip animation. Click anywhere to trigger a cursor burst.
  • Bouncing Balls7–14 glossy pastel balls bounce off walls and collide with elastic physics; cursor repels balls within a 70px radius.
  • Spring ChainA 16-node spring chain whips and follows the cursor in a lime-to-gold gradient; drifts in a figure-eight pattern when idle.
  • Cloth Wave GridAn 11x11 wireframe grid ripples like cloth via sine/cosine waves in cyan-to-violet hues; mesh nodes bulge away from the cursor on hover.