A browser-based Pong game controlled by hand gestures via webcam, built with vanilla JavaScript and MediaPipe Hands.
This is a learning project. I'm building it to explore computer vision in the browser and improve my JavaScript skills. Part of the code is created with the help of AI agents to accelerate the learning process and development.
- HTML5 Canvas
- JavaScript
- MediaPipe Hands (hand tracking)
- WebRTC (camera access)
- Allow camera access in your browser
- Move your hand up and down to control the paddle
- Hit the ball against the wall and keep the rally going!
- Basic Pong with hand controls
- AI opponent
- Score tracking
- Difficulty levels
🚧 Work in progress
- How to use the MediaPipe Tasks Vision library for real-time hand tracking in the browser
- How browser script loading works — and why
defermatters when mixing ES modules with classic scripts - How to share data between JavaScript modules using
windowas a bridge