This project is a simple Eularian fluid simulator based on Jos Stam's Stable Fluids Method.
The implementation closely follows the one described in the paper Real-Time Fluid Simulation for Games.
The implementation is written entirely in TypeScript on the CPU and rendered with the HTML canvas API (no shaders used for rendering or the fluid solving) so the resolution of the simulation is limited but still enough for interesting results.
A demo for the project is available here https://sbobyn.github.io/stable-fluids.ts/
- GPU based solver with WebGL shaders + fast rendering with simple frag shader
- 3D
- more methods
- vorticity confinement
- Hybrid methods (PIC, FLIP, APIC, Poly PIC)
- SPH
- level sets for surface reconstruction
- DL-based