[−][src]Crate salva3d
Salva is a 2 and 3-dimensional particle-based fluid simulation engine for games and animations. It uses nalgebra for vector/matrix math and can optionally interface with nphysics for two-way coupling with rigid bodies, multibodies, and deformable bodies. 2D and 3D implementations both share (mostly) the same code!
Examples are available in the examples2d
and examples3d
directories. Because those demos are based on
WASM and WebGl 1.0 they should work on most modern browsers. Feel free to ask for help
and discuss features on the official user forum.
Why the name Salva?
The name of this library is inspired from the famous surrealist artist Salvador Dalì
. The logo of Salva
is inspired from its renown painting The Persistence of Memory.
Features
- PBF pressure resolution.
- XSPH viscosity.
- Multiphase fluids.
- Optional two-way coupling with bodies from nphysics.
- WASM support
Modules
geometry | Acceleration data structures for collision detection. |
kernel | Smoothing kernels. |
math | Compilation flags dependent aliases for mathematical types. |
object | Fluid and boundary objects that can be simulated. |
solver | Algorithms for solving pressure, viscosity, surface tension, etc. |
Structs
LiquidWorld | The physics world for simulating fluids with boundaries. |
TimestepManager | Structure responsible for regulatin the timestep length of the simulation. |