DEV Community

Yogender
Yogender

Posted on

๐Ÿ–๏ธ Hand-Controlled Particle Gravity Simulation (WebGL + Three.js)

I built an interactive particle gravity simulation that reacts to real-time hand gestures โ€” fully in the browser.

No game engine.
No plugins.
Just WebGL + Three.js + AI-based hand tracking.

You can literally turn your hand into a gravity well and control thousands of particles in real time.

๐Ÿš€ Live Demo

๐Ÿ‘‰ https://particle-gravity-fun.pages.dev/

๐Ÿ’ป Source Code (Open Source)

๐Ÿ‘‰ https://github.com/yogender-ai/Particle-Gravity-Fun

โญ Feel free to star or fork if you find it interesting

โœจ Features

~8,000 particles rendered in real time

Smooth 60 FPS particle swarming

Dynamic color physics (gesture-based color transitions)

Pinch gesture triggers high-energy โ€œcosmicโ€ effects

Runs entirely in the browser

๐Ÿ› ๏ธ Tech Stack

Three.js (WebGL rendering)

JavaScript

AI Hand Tracking (MediaPipe)

WebAssembly (for performance-critical logic)

Cloudflare Pages (deployment)

๐Ÿง  Why I Built This

This started as a fun experiment to explore how far creative coding + AI + web graphics can go without heavy frameworks.

Itโ€™s exciting to see sci-fi-like interactions becoming possible directly on the web.

๐Ÿ™Œ Feedback Welcome

Iโ€™m actively improving this project and experimenting with:

Better physics

More gesture types

Performance optimizations

Would love feedback from fellow developers ๐Ÿ™
If you enjoyed it, please โญ the repo or share ideas.

๐Ÿ”– Tags (important on dev.to)

Add these when publishing:

threejs #webgl #javascript #creativecoding #opensource #ai #frontend

Top comments (2)

Collapse
ย 
martijn_assie_12a2d3b1833 profile image
Martijn Assie โ€ข

This is genuinely cool. Turning hand gestures into a gravity source feels playful but also technically solid, and getting this many particles running smoothly in the browser is no small thing. Nice example of how far creative coding with Three.js and WebGL can go today.

Collapse
ย 
yogender_811605e639001e58 profile image
Yogender โ€ข

Thank you