← Back to experiments

Particle Field

12,000 particles drifting in cool aquatic tones, pulled toward your cursor and glowing red the closer they get — like a magnet through iron filings.

Move your mouse

Each of the 12,000 particles drifts on its own slow, curving current, colored from a random cool palette of aquatic blues, soft purples, and calm emeralds. When your cursor comes within range, nearby particles are pulled toward it, morphing smoothly into a bright red the closer they get. Motion trails come from painting a translucent white layer each frame instead of clearing the canvas — cheaper than tracking a position history per particle, and it lets thousands of dots move at once. Colors are grouped into a small set of buckets so the whole field can be drawn in a handful of batched fill calls per frame. Rendered with plain canvas 2D — no rendering libraries — and paused automatically when the tab is hidden or when your system has reduced motion enabled.