Drag, splash, smear
Pointer movement injects velocity and dye into the field. Fast strokes tear the flow into vortices; slow ones push a calm plume. Touch works the same way.
Stir smoke, paint and water with your cursor. Every frame is solved on your GPU — no install, no sign-up, no upload. Drag the canvas to start.
This browser can’t run the WebGL2 simulation.
Try the latest Chrome, Edge, Firefox or Safari on desktop.
Three things the demos currently ranking for this term rarely offer: it keeps up with your finger, it explains itself, and it lets you take the result away.
Pointer movement injects velocity and dye into the field. Fast strokes tear the flow into vortices; slow ones push a calm plume. Touch works the same way.
Dye fade, flow drag, pressure iterations, swirl, brush size and force. Raising pressure solve removes compressibility artefacts; swirl puts back the small vortices numerics would eat.
Copy link stores every parameter in the URL — send it and the other person opens the exact flow you tuned. Record 5s grabs a WebM straight from the canvas.
The short version, without the maths.
This is an implementation of the Stable Fluids method: instead of pushing particles around, the velocity field itself is stored as an image and updated in five GPU passes every frame.
For every pixel, look backwards along the current velocity to find where the fluid came from, and copy that value forward. This one trick is why the simulation stays stable even with large time steps.
Compare how much flow enters and leaves each cell. Real liquids are incompressible, so any cell that gains or loses volume needs a correction.
A Jacobi iteration solves the pressure field that cancels that divergence. More iterations, cleaner flow — the Pressure solve slider controls exactly that.
Removing the pressure gradient leaves a velocity field that conserves mass. This is the step that turns a pretty smear into something that behaves like a liquid.
The visible colour is a passive scalar advected by the same field at a higher resolution than the solver, which is why fine filaments survive while the simulation grid stays small enough to hit 60fps.
A second engine that solves the actual discretised Navier–Stokes equations — with Reynolds number, drag coefficients and a vortex street you can measure — is being built for Lab. It is the same family of methods used in engineering CFD, scaled down to something a browser can run.
The same engine with different presets — each page answers a different question.
Short answers to what people usually ask.
It is a real solver running every frame. Variables are stored in textures on the GPU and stepped through the same five stages a CFD code uses: advection, divergence, pressure projection, gradient subtraction and dye transport. Nothing is pre-rendered.
Yes. Touch drag injects velocity and dye exactly like a mouse. The simulation grid and detail level scale down automatically on smaller GPUs so the frame rate stays usable.
Everything on this site is free right now, and recordings are made locally in your browser. They are intended for personal and educational use; if you want to ship a clip in paid work, ask first.
No. The simulation, the parameters and the recording all happen in your browser. The only thing that leaves the page is a share link, which encodes your settings in the URL itself.