Realistic Physics Simulations in the Browser: Saharan's Collection
If you're looking for some seriously impressive physics simulations running in the browser, Saharan's collection at oimo.io is worth diving into. We're talking realistic water droplets with WebAssembly SIMD acceleration, interactive fluffy balls simulated with GPGPU, coupled cloth and fluid dynamics, and even a digital clock that's somehow powered by a custom physics engine. These aren't toy demos either. The attention to physical accuracy and performance optimization is on another level, with projects like the 3D fluid sim using MLS-MPM (Material Point Method) and parallel computation strategies that actually make real-time interaction possible.
What makes these projects extra interesting from a technical standpoint is that they're all written in Haxe, which probably isn't on most people's radar but compiles down to JavaScript (and C++, and pretty much everything else). Saharan is a software engineer with a PhD from the University of Tokyo who's won multiple international programming contests.
All the code is up on GitHub under an MIT license if you want to see how it's built. You can tweak parameters on most of the demos (surface tension, gravity, particle counts) and watch the simulations react in real time. Definitely check out Drops, Marimo, the cloth sims, and Water3D at minimum. And if you're curious about the Haxe ecosystem or GPGPU techniques for browser-based physics, this repo is a goldmine.
- Live Demo: https://oimo.io/works
- Source Code: https://github.com/saharan/works
- Author: Saharan