โโโโโโโโโ โจ QUICK NAV โฉ โโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
flowchart LR
subgraph Input
A([๐น Webcam]):::cam
end
subgraph AI["๐ง AI Layer"]
B[MediaPipe Neural Net]:::ai
C[21 Landmarks per Hand]:::ai
end
subgraph Rust["๐ฆ Rust Core / WASM"]
D[Spatial Hash]:::rust
E[N-Body Solver]:::rust
F[Verlet Integration]:::rust
end
subgraph Render["๐จ GPU Render"]
G[Three.js Scene]:::gl
H[Custom Shaders]:::gl
I([๐ป 60+ FPS]):::result
end
A ==>|raw frames| B
B ==>|inference| C
C ==>|x, y, z coords| D
D ==>|neighbors| E
E ==>|forces| F
F ==>|positions| G
G ==>|draw calls| H
H ==> I
classDef cam fill:#1a1a2e,stroke:#5eead4,color:#5eead4,stroke-width:2px
classDef ai fill:#1a1a2e,stroke:#fbbf24,color:#fbbf24,stroke-width:2px
classDef rust fill:#1a1a2e,stroke:#CE422B,color:#ff8266,stroke-width:2px
classDef gl fill:#1a1a2e,stroke:#a78bfa,color:#c4b5fd,stroke-width:2px
classDef result fill:#0d1117,stroke:#22c55e,color:#22c55e,stroke-width:3px
| Rust | WASM | Three.js | WebGL | MediaPipe | Cloudflare |
|---|---|---|---|---|---|
| 1.75+ | Core | r160 | 2.0 | Hands | Pages |
Master these gestures and bend reality to your will.
| Gesture | Mode | Effect |
|---|---|---|
| โ๏ธ Index Finger | Swarm | Particles orbit your fingertip like moons around a planet |
| ๐ค Pinch | Supernova | Releases a chaotic burst of color and energy |
| ๐๏ธ Open Palm | Kamehameha | Charges an energy beam |
| โ Fist | Fire | Unleashes the charged beam in a torrent of light |
| ๐ Two Hands | Battle | Two opposing gravity wells fight for cosmic dominance |
| ๐ต Music | Audio | Particles dance to bass, treble, and rhythm |
| ๐ Swarm | โค๏ธ Heart | ๐ช Saturn | ๐ธ Flower |
|---|---|---|---|
| ๐ Fireworks | โ๏ธ Battle | ๐ก๏ธ Survival | ๐ต Audio Reactive |
# One link. Zero setup.
open https://particle-gravity-fun.pages.dev/Allow webcam โ wave hands โ become gravity.
# Clone
git clone https://github.com/yogender-ai/Particle-Gravity-Fun.git
cd Particle-Gravity-Fun
# Install
npm install
# Build WASM core
wasm-pack build --target web --release
# Launch
npm run devPARTICLE COUNT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 8,192
FRAME RATE (avg)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 62 FPS
HAND TRACKING LATENCY
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 18ms
WASM EXECUTION (per frame)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 2.4ms
BUNDLE SIZE (gzipped)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 280 KB
COLD START TIME
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 1.8s
| Device | FPS | Particles | Notes |
|---|---|---|---|
| ๐ฅ๏ธ M1 MacBook Pro | 120 | 16,384 | Buttery smooth |
| ๐ป Ryzen 5 + RTX 3060 | 144 | 16,384 | Maxed out |
| ๐ผ Intel i5 + Iris Xe | 60 | 8,192 | Default config |
| ๐ฑ iPhone 13 | 60 | 4,096 | Auto-scaled |
| ๐ฑ Pixel 6 | 58 | 4,096 | Auto-scaled |
| ๐ฅ 2015 Chromebook | 30 | 2,048 | Still magical |
quantum-flux/
โ
โโโ src-rust/ # Rust โ WASM core
โ โโโ lib.rs # WASM entry & bindings
โ โโโ physics/
โ โ โโโ solver.rs # N-body gravity solver
โ โ โโโ verlet.rs # Verlet integration
โ โ โโโ spatial_hash.rs # O(n) neighbor lookups
โ โโโ particle.rs # Particle struct & lifecycle
โ โโโ morphs/
โ โโโ heart.rs # Heart formation
โ โโโ saturn.rs # Orbital rings
โ โโโ flower.rs # Fibonacci spiral
โ
โโโ src/
โ โโโ main.js # Entry point
โ โโโ scene.js # Three.js scene setup
โ โโโ shaders/
โ โ โโโ particle.vert # Vertex shader
โ โ โโโ particle.frag # Fragment glow & color
โ โโโ tracking/
โ โ โโโ mediapipe.js # AI wrapper
โ โ โโโ gestures.js # Gesture recognition
โ โโโ audio/
โ โ โโโ analyzer.js # FFT music reactor
โ โโโ ui/
โ โโโ hud.js # Score & stats overlay
โ โโโ controls.js # Mode switcher
โ
โโโ public/ # Static assets
โโโ feedback.html # Feedback page
โโโ README.md # You are here
โโโ wrangler.toml # Cloudflare config
โโ โ
v1.0 โโโโโโโ 8K particles + hand tracking
โ
โโ โ
v2.0 โโโโโโโ Battle mode + audio reactive
โ
โโ โ
v2.1 โโโโโโโ Kamehameha + survival mode โโโ you are here
โ
โโ ๐ v2.2 โโโโโโโ Multiplayer cosmos (WebRTC)
โ
โโ ๐ฎ v3.0 โโโโโโโ VR/AR support (WebXR)
โ
โโ ๐ v4.0 โโโโโโโ AI-generated particle behaviors
Your voice shapes the next iteration.
| ๐ญ Have an idea? | ๐ Found a bug? | โญ Loved it? |
|---|---|---|
| Open Discussion | Report Issue | Star the repo |
If Quantum Flux made you smile or spend a Saturday afternoon bending particles, a star keeps the cosmos expanding.
# Fork the cosmos
git checkout -b feature/cosmic-idea
# Channel the muse
git commit -m "Add black hole mode"
# Push to the void
git push origin feature/cosmic-ideaLooking for help with:
- ๐จ New morph shapes
- ๐ต Better audio analysis
- ๐ฑ Mobile gesture mapping
- ๐ i18n / translations
- ๐ Tutorials and blog posts
- ๐ฌ Demo video creation
MIT License โ fork it, ship it, remix it.
Standing on the shoulders of giants:
QUANTUM FLUX v2.1 ยท Rust โค๏ธ WASM โค๏ธ WebGL ยท Made in the cosmos
