https://github.com/zzstoatzz/fluids
https://github.com/zzstoatzz/fluids
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zzstoatzz/fluids
- Owner: zzstoatzz
- Created: 2023-10-29T05:22:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-30T09:08:53.000Z (over 1 year ago)
- Last Synced: 2025-03-25T19:12:31.191Z (2 months ago)
- Language: Go
- Size: 6.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```console
git clone https://github.com/zzstoatzz/fluids.gitcd fluids
go run main.go
```
### flags
- n: number of particles (defaults to 500)
- radius: radius of particles (defaults to 2.4)
- fps: frames per second (defaults to 480)
- g: gravity (defaults to disabled and -100000 if gravity toggled while not set by flag)
- dt: time step (defaults to 0.0005 seconds)
- boom: magntiude of left click blast (defaults to 100.0)### example
```console
go run main.go -n 100 -radius 4 -pressure 100000 -fps 240 -dt 0.0001 -boom 1000
```### in-simulation controls
- click to create a small blast radius
- press g to toggle gravity
- press space to pause
- press r to reset