Skip to content

collidingScopes/fruit-ninja

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✋ Fruit Ninja 🥷

A browser-based Fruit Ninja game using hand-tracking. No additional hardware required - just a webcam.

Play here 🎮: https://collidingscopes.github.io/fruit-ninja/

Features

  • Hand tracking: Uses MediaPipe for real-time hand detection
  • 3D fruits: Built with Three.js for smooth 3D animations
  • Gesture-based controls: Slice fruits by moving your hand quickly
  • Visual feedback: Colorful blade trails and explosion particles
  • Scoring system: Keep track of your high score
  • Lives system: Miss a fruit and lose a life (5 lives to start)
  • Progressive difficulty: Game gets harder as you progress

How to Play

  1. Allow camera access when prompted
  2. Position yourself so your hand is visible in the webcam feed (left side of screen)
  3. Click "Start" to begin
  4. Move your hand quickly to slice fruits that appear on the right side
  5. Avoid missing fruits to maintain your lives
  6. Try to achieve the highest score!

Technical Details

  • Uses MediaPipe Hands for hand tracking
  • Three.js for 3D rendering
  • Vanilla JavaScript with no framework dependencies
  • Optimized for both desktop and mobile devices
  • Cross-platform compatibility with modern browsers

Feedback

Send feedback via:

License

MIT License - Feel free to use and modify as you wish!