forever components

Particles & Physics

Smoke Vortex Street

300 teal smoke streamlines flow past an invisible cylinder, shedding alternating Karman vortices; pointer repels nearby particles revealing the swirling wake.

canvasheavy complexitymoderate 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 ambient backgrounds, fluid-dynamics demos, science or generative-art hero sections.

When not to

Light-background UIs (background is hardcoded dark teal-black). Contexts where pointer interaction competes with UI elements above the canvas.

Working with an AI agent

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

Change the smoke color to a warm amber palette by editing the strokeStyle line: replace (40+heat*70|0),(150+heat*60|0),(150+heat*40|0) with (220+heat*35|0),(120+heat*80|0),(20+heat*20|0). 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=300)
  • obstacle position (oX=W*0.30, oY=H*0.5)
  • obstacle radius (oR=sc*0.07)
  • eddy shed period (period=58)
  • base flow speed (sc*0.0016)
  • smoke color (strokeStyle heat ramp)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

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

Known limitations

  • Background color is hardcoded in CSS (#0a1416) — must edit to use on non-dark themes
  • Eddy shedding uses integer modulo (t%period===0) so period must be an integer
  • Reduced-motion path runs 160 static frames then halts — result may look sparse on large viewports

smokefluidvortexkarman-streetparticlesphysicsambient

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.