Fluids are one of those things your eye knows instantly. You can fake a lot in graphics, but if water doesn't slosh, pool, and splash the way it should, everyone notices. The liquid simulator was an attempt to get that feeling running in real time in a browser tab.
Particles over grids
I went with a particle-based approach — thousands of little points carrying velocity, pushed around by pressure and gravity, instead of solving the fluid on a fixed grid. Particles make free surfaces and splashing fall out naturally, which is exactly the part that sells it as a liquid rather than a moving texture.
The neighbor problem
The expensive part is that every particle only cares about the particles near it, and "near" changes every single frame. Checking every pair is hopeless once you have any real count, so most of the work went into a spatial grid that buckets particles by cell and only compares within neighboring cells. Get that right and the particle count you can afford jumps by an order of magnitude.
Stable beats accurate
For something interactive, stability matters more than physical accuracy. A simulation that's perfectly correct but blows up when you stir it too fast is useless; one that's slightly fudged but never explodes is fun to poke at. A lot of the tuning was capping velocities and softening pressure so the whole thing stays well-behaved when you start sloshing it around.
Just a short note for now — a fuller writeup will come when I revisit the project.