pbd-fluid-rs
is a 2D Position Based Fluid implementation in Rust with WASM + WebGL. It was inspired by Matthais Müller's position based fluid demo.
For a quick demo, please see https://lucas-schuermann.github.io/pbd-fluid-rs/. The WASM version of this project is deployed to Github Pages after building with Github Actions.
# debian/ubuntu
apt install build-essential pkg-config cmake libfreetype6-dev libfontconfig1-dev
RUST_LOG=info cargo run --package native --release
Press 1-4
to select a dam break scene and reset the simulation, s
to toggle drawing with a single color, or space
to add a block of particles.
# install dependencies
npm install
# compile to WASM, run webpack, and spawn a local server
npm run serve
Then visit http://localhost:8080
This project is distributed under the MIT license.