
WebGL Fluid Simulation
A browser-based fluid simulation you can stir with your mouse or finger.
- Stars
- 16.8k
- Forks
- 1.9k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 2.0 years ago
- Type
- App
No commits in over a year — check for forks or alternatives before adopting.
What it is
This is an interactive fluid simulation that runs in a web browser using WebGL, which lets the computer's graphics processor do the math. You move the pointer or touch the screen to push colored fluid around and watch it swirl. The README says it works on mobile too, and it is useful as a visual demo or a reference for GPU-based fluid code.
- Play with the live demo in a browser
- Study the source code to see how a GPU fluid simulation is structured
- Use it as a starting point for a visual or interactive web experiment
- Read the linked references on GPU fluid dynamics to learn the underlying approach
Great for
- People curious about how fluids behave in a visual, hands-on way
- Developers who want a working WebGL example to study or adapt
- Students learning about fluid simulation concepts
- Anyone who wants to try it on a phone or tablet without installing anything
Not ideal for
- Users needing scientific-grade fluid results, since the README describes it as a visual demo and does not claim physical accuracy
- Users on very old browsers or devices without WebGL support, as the README does not list supported browsers
How to get it
- 1
Use it in the browser (or self-host)
Clone the repository
git clone https://github.com/PavelDoGreat/WebGL-Fluid-Simulation - 2
Run it
- Open the live demo at https://paveldogreat.github.io/WebGL-Fluid-Simulation/
- Move your mouse or drag your finger across the screen to stir the fluid
- Clone the repository if you want to inspect or modify the code
- 3
Get the most out of it
- Try it on a phone or tablet, since the README says it works on mobile
- Read the NVIDIA GPU Gems chapter linked in the README for the underlying technique
- Compare with the linked mharrys/fluids-2d and haxiomic/GPU-Fluid-Experiments projects to see other approaches
Downloads
Strengths
- Runs in the browser with no installation needed, according to the README
- Works on mobile devices as stated in the description
- Open-source under the permissive MIT license
Trade-offs
- The README is very short and offers little documentation on how the code is organized
- No formal releases are published, so you work from the current code on the main branch
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| WebGL-Fluid-Simulation (this) | 16.8k | App | beginner | 2.0 years ago | People curious about how fluids behave in a visual, hands-on way |
| gpu.js | 15.5k | Library | intermediate | 6 days ago | Developers who need to speed up large numeric computations in the browser |
| stats | 43k | App | beginner | 5 days ago | Mac users who want a glanceable view of CPU, memory, network or battery in the menu bar |
| neovide | 15.3k | App | intermediate | 5 days ago | Neovim users who want a standalone graphical window |
| JoltPhysics | 12.1k | Library | advanced | 4 days ago | C++ game developers who need a physics engine for rigid bodies and collisions |
| supersplat | 10.6k | App | beginner | 5 days ago | People who want to clean up or trim a Gaussian Splat scene without installing software |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.