https://github.com/sulami/three-bodies
🪐 Three body simulation
https://github.com/sulami/three-bodies
rust three-body-problem wasm
Last synced: 10 months ago
JSON representation
🪐 Three body simulation
- Host: GitHub
- URL: https://github.com/sulami/three-bodies
- Owner: sulami
- Created: 2024-04-17T05:25:25.000Z (about 2 years ago)
- Default Branch: trunk
- Last Pushed: 2024-04-18T08:36:15.000Z (about 2 years ago)
- Last Synced: 2024-04-18T10:03:58.496Z (about 2 years ago)
- Topics: rust, three-body-problem, wasm
- Language: Rust
- Homepage: https://three-bodies.sulami.xyz/
- Size: 4.91 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Three Bodies
This is a simple three body simulation, built over a lunch break to try
out [macroquad](https://docs.rs/macroquad/latest/macroquad/index.html).
An online version can be found [here](https://three-bodies.sulami.xyz/).
https://github.com/sulami/three-bodies/assets/1843193/d8a41847-a475-46c8-8eb9-396d64411175
_Note:_ If you are using a non-standard keyboard layout, the controls do not take that into account.
## Building
For the native version, run
```sh
cargo run --release
```
For the wasm version, run
```sh
cargo build --target wasm32-unknown-unknown --release
cp target/wasm32-unknown-unknown/release/three-bodies.wasm docs/
```