Skip to content
Smooth particle hydrodynamics in rust
Rust JavaScript CSS HTML GLSL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benches
src
www
.gitignore
Cargo.toml
LICENSE
README.md

README.md

spherro

Crates.io

A smoothed particle hydrodynamics fluid simulator. Built with rust, and compiled to wasm. Check out the demo here.

gif

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

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

License

MIT License

You can’t perform that action at this time.