Skip to content

Commit f757a6d

Browse files
Initial commit :)
0 parents  commit f757a6d

File tree

8 files changed

+617
-0
lines changed

8 files changed

+617
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

Cargo.lock

+223
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "particles"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
9+
clap = { version = "4.4.13", features = ["derive"] }
10+
11+
12+
[profile.release]
13+
lto = true
14+
codegen-units = 1
15+
strip = true
16+
panic = "abort"

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Particle Attraction/Repulsion
2+
3+
This is a satisfying "simulation" of particles that attract and repel to the mouse. It's not really a simulation, but it looks cool.
4+
5+
Keybindings:
6+
7+
- `R`: reset the particles
8+
- `SPACE`: toggle the mouse attraction/repulsion
9+
- `B`: toggle the screen border collision
10+
- `Arrow Keys (Up/Down/Left/Right)`: Add/Remove 1/1/100/100 particles
11+
- `ESC`: quit
12+
13+
## Compilation
14+
15+
Install raylib on your system, then adjust the [build.rs](/build.rs) file to point to the raylib library.
16+
Then, just run `cargo build --release` to compile.
17+
I will maybe add Android and Web support in the future.

build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
println!("cargo:rustc-link-search=native=/usrlib/");
3+
println!("cargo:rustc-link-lib=raylib");
4+
}

0 commit comments

Comments
 (0)