https://github.com/jekixd/water-simulation
https://github.com/jekixd/water-simulation
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jekixd/water-simulation
- Owner: JekiXD
- Created: 2024-03-22T16:11:11.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-25T12:45:00.000Z (11 months ago)
- Last Synced: 2025-04-22T17:16:44.677Z (27 days ago)
- Language: Rust
- Size: 7.35 MB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Water simulation using particles written with WebGPU
To start the program, run the following commands in the main directory:
```
cargo build --all
cargo run
```If simulation is lagging, you can try decreasing the amount of particles in `settings.rs` file. Or you can try decreasing the size of a grid used for neighbour search(`grid_size`). If you want to do the latter, then there are 2 options:
- You can change it with a menu after launching the program. In this case, if you decrease the size of the grid, you will see artifacts, mainly the grid itself. This happens due to radius of kernels being bigger than the grid. You can then change kernel's sizes accordingly
- Or change it in `settings.rs` file to preserve kernel's sizes to be equal to grid size.Beware, that changing kernel's radiuses is going to destabilize the system. You'll have to play with values(the main ones are "Rest density" and "Near/Pressure multiplier") to find a new balance.