PavelDoGreat/WebGL-Fluid-Simulation
Media & DesignAn interactive GPU fluid simulation that runs in the browser and responds to pointer or touch input.
What it is
WebGL Fluid Simulation is a browser-based interactive fluid demo. It solves a Navier-Stokes-style fluid model on the GPU and lets you disturb the fluid with the mouse or a touch screen, so the screen fills with swirling dye and vortices. It is aimed at people who want to play with a real-time graphics demo or study a compact WebGL implementation of GPU fluid dynamics; the project lists GPU Gems and two other fluid projects as references references in the README.
Quick start
The published build is the shortest path: open the live demo in a browser and drag a finger or the pointer across the canvas to inject motion. No install is needed for this route. The demo is described as working on mobile as well as desktop.
To run it from source, open the repository, clone it locally, and serve the directory with any static file server — the README does not give a build or install command, so the exact run steps are a gap in the supplied material. The entry point is index.html, which loads the JavaScript that sets up the WebGL context and simulation.
Requirements and limits
Running the simulation needs a browser that supports WebGL, and the fluid is computed on the GPU, so performance depends on the graphics hardware and driver. The README does not document browser versions, memory use, or a fallback for devices without WebGL. The code is available under the MIT license license, which permits reuse and modification with attribution.
HotRepo's take
The project has a long life: it was created in 2017, and its one recorded daily JavaScript-language entry on 2026-11-12 placed it 13th at 9 stars gained that day. That single snapshot says little about trend, so the more interesting signal is the 2023 Hacker News thread, where commenters noted the sparse state of WebGL on the web and mentioned that the owner had shipped this simulation as both an iOS and an Android app thread app discussion. Another commenter pointed to browser and driver restrictions as the practical ceiling on hardware-accelerated WebGL driver remark. For readers, that is the main context: a small, self-contained demo whose appeal is the visual result and the readable GPU implementation, not a packaged library or an actively expanded product.
Written by AI from the project's README, updated . The project's own docs are the source of truth.