A single-file, interactive particle visualization built with Three.js, MediaPipe Hands, and Tailwind CSS. The scene renders a high-density particle field that can morph between preset shapes (Heart, Saturn, Flower, DNA Helix, Fireworks) and responds to real-time hand gestures using your webcam.
Designed as a visual/interaction demo: a lightweight, framework-free “AI + GPU” experience you can run locally by opening one HTML file.
Can also view a live preview by clicking the link here: Click Here
- Uses MediaPipe Hands to track one or two hands from your webcam.
- Interaction modes:
- Two hands: move hands apart/together to control expansion.
- One hand: pinch (thumb + index) to influence the effect (mapped to expansion/scatter style control).
- Renders thousands of particles in a Three.js
Pointssystem. - Smoothly morphs particle positions between shape presets:
- ❤️ Heart
- 🪐 Saturn / ringed sphere
- 🌸 Flower
- 🧬 DNA helix
- 🎆 Fireworks burst
- Morph behavior is controlled by a configurable
morphSpeedfor satisfying “liquid” transitions.
- Hand position (centroid) influences rotation:
- Move your hands left/right to rotate horizontally
- Move up/down to tilt the form
- Expansion is smoothed with a “drag” factor so the motion feels stable instead of twitchy.
- Tailwind-powered “glassmorphism” UI panel:
- Base color picker (updates particles in real time)
- Shape selection buttons
- Live expansion readout
- Subtle scene fog and additive blending for a glowing particle aesthetic.
- Everything lives in one HTML file: easy to share, demo, and iterate.
- Dependencies loaded via CDNs:
- Tailwind CSS
- Three.js
- MediaPipe Hands + camera utils
- Three.js (WebGL rendering / particles)
- MediaPipe Hands (real-time hand tracking)
- Tailwind CSS (UI styling)
- Vanilla JavaScript (no frameworks)
- Download or clone the repo
- Open
index.htmlin a modern browser (Chrome recommended) - Allow webcam permissions when prompted
Some browsers restrict camera access on file:// URLs. If your camera doesn’t start, run a local server:
python -m http.server 8000Then open:
http://localhost:8000

