∞ forever components

Particles & Physics

Viscosity Swirl

Viscosity Swirl control in the Artisan Café system.

canvasmedium complexitymoderate motionpointeraccessible

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 →
1

When to use it

Café, coffee or tea sites that want a calm stirring toy: the pointer pushes thick crema blobs around a round cup.

When not to

Touch-free or keyboard-only contexts: the swirl reacts to pointer movement only. Light pages where a dark round cup would clash.

Working with an AI agent

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

Slow the swirl by lowering the 0.012 angle step in draw(), make the crema denser by raising the 65 in Array.from({ length: 65 }), and recolour the blobs by editing the two colour strings '#E9C96A' and '#C78C46'. The cup size and rim live in .pa06-cup-wrap (360px, 8px border).

Safe to edit

  • blob count (the length: 65 in the particles array)
  • swirl speed (the 0.012 angle step in draw)
  • pointer push radius and strength (80 and * 4 in draw)
  • blob colours ('#E9C96A', '#C78C46')
  • cup size and rim (.pa06-cup-wrap width, height, border)
  • trail fade (rgba(28, 18, 12, 0.2) fill in draw)

Keep intact

  • pa06- class prefix and the .pa06-cup-wrap root
  • prefers-reduced-motion guard and visibilitychange pause
  • demo-v1 preview lifecycle: initialize demoEnabled from window.__foreverPreview and stop attract work on the window forever:interactive event; retain manual feedback, settling, cleanup and explicit sessions

Known limitations

  • The swirl responds to pointer movement only; there is no keyboard control
  • State remains local to each mounted instance; format/theme remount preserves takeover, not component values.

coffeesensoryartisansoundscapesteamorganicviscosity-swirlparticlesfluidviscosityhydrodynamicscremaswirlpariocaphysics

More Particles & Physics components

  • Gravity Dot RainMatte verdigris, mauve, rose, moss and ochre dots fall under gravity with motion trails, bounce off the floor, and scatter away from the cursor on a dark…
  • Firework BurstColorful glowing sparks burst radially, fall under gravity, and fade against a dark sky. Initial automatic launches stop after first input; canvas clicks…
  • Confetti CannonOchre festival-paper palette: broad confetti rectangles fire from bottom corners, tumble and flip. First input stops automatic launches; a manual burst…
  • Bouncing Balls7–14 glossy matte-toned balls (verdigris, dusty rose, ochre, slate blue, lilac, moss) bounce off walls and collide with elastic physics; cursor repels…
  • Spring ChainA 16-node spring chain whips and follows the cursor in a lime-to-gold gradient; initial figure-eight attract motion stops after first input; manual chain…
  • Cloth Wave GridA 10x10 wireframe grid ripples like cloth via sine/cosine waves through dusted sky-blue, aqua and lilac hues; mesh nodes bulge away from the cursor on hover.