crucıble

Eddy

A WebGL fluid-simulation cursor trail: pointer strokes inject ink into a curl-noise-advected flow field (ping-pong framebuffers) that swirls, marbles, and slowly dissipates, paling as it disperses. Deep ultramarine on a transparent canvas, scoped to its container, coarse-pointer- and reduced-motion-safe; clicks stack heavier blots and it idles on its own when untouched.

oglpro

Installation

CLI

npx shadcn@latest add @crucible/eddy

Manual — install dependencies, then copy the source

npm install ogl

Props

PropTypeDefaultDescription
colorstringdeep ultramarineInk color (hex). The dye blooms saturated at the core and desaturates toward a pale wash as it disperses.
intensitynumberDye opacity multiplier, 0–1-ish. 1 = default.
dissipationnumber0.55Fraction of dye kept after one second, 0–1. Lower fades faster.
radiusnumber0.11Splat radius as a fraction of the container's height.
swirlnumberHow strongly the ink curls on itself. 1 = default.
globalbooleanAttach to the whole viewport instead of the nearest containing element. Off by default — Eddy is scoped to its parent (place it inside a relative container) so ink never flows page-wide unless you opt in.
pausedbooleanFreeze the simulation, holding the current frame.
classNamestringExtra classes for the wrapper. Positioned absolute inset-0.
idlebooleantrueIdle autoplay (scoped mode only): after 1.5s with no pointer in the container, a ghost hand stirs the water along a slow seeded Lissajous path and now and then drops a blot, so the surface never looks dead — on touch-only devices too. A real pointer takes over instantly. Never under reduced motion; sleeps offscreen.
refReact.Ref<EddyHandle>React 19 ref prop — imperative pulse(x?, y?) blot.

Honors prefers-reduced-motion with a designed static fallback, pauses offscreen and on hidden tabs, and passes className through.