3 unstable releases
0.2.1 | Jul 24, 2019 |
---|---|
0.2.0 | Jul 24, 2019 |
0.1.0 | Jul 1, 2019 |
#226 in Simulation
135KB
1K
SLoC
spherro
A smoothed particle hydrodynamics fluid simulator. Built with rust, and compiled to wasm. Check out the demo here.
Building
Dependencies
All instructions have been tested on Ubuntu 18.04, with the versions:
- rust 1.35.0
- wasm-pack 0.8.1
- npm 6.9.0
- node v10.16.0
Steps to build
- Install:
- Clone this repo:
git clone https://github.com/medakk/spherro
- In the root folder of the repo, run
wasm-pack build
- In the
www
folder, run:
npm install
npm run start
This will start a server(defaults to http://localhost:8080) serving spherro.
Debugging
Running cargo run --bin spherro-bin --release
starts a kiss3d-based viewer that can be used to debug the simulator without going through the browser.
Running cargo bench
starts a headless dambreak simulation with a fixed time step. This can be used to test performance changes.
References
- SPH Fluids in Computer Graphics, EUROGRAPHICS 2014
License
Dependencies
~10–23MB
~326K SLoC