xcx-mp-hand

MediaPipe Hand Detection Extension for Xcratch

An extension for Xcratch that provides hand detection and tracking capabilities using machine learning.

This extension uses MediaPipe’s hand landmark detection to track hand movements in real-time through your camera, allowing you to create interactive projects that respond to hand gestures and positions.

✨ What You Can Do With This Extension

Play Example Project to look at what you can do with “MediaPipe Hand Detection”.

Privacy Notice

This extension does not send any image data externally. All hand detection processing is performed locally in your browser.

How to Use in Xcratch

This extension can be used with other extension in Xcratch.

  1. Open Xcratch Editor
  2. Click ‘Add Extension’ button
  3. Select ‘Extension Loader’ extension
  4. Type the module URL in the input field
    https://yokobond.github.io/xcx-mp-hand/dist/xcxMPHand.mjs
    
  5. Click ‘OK’ button
  6. Now you can use the blocks of this extension

Hand Landmarks Guide

The extension tracks 21 landmarks (numbered 0-20) on each hand:

CMC = Carpometacarpal joint, MCP = Metacarpophalangeal joint, PIP = Proximal interphalangeal joint, DIP = Distal interphalangeal joint

Available Blocks

Control Blocks

Detection Blocks

Hand Information

Position Blocks

Advanced

Development

Install Dependencies

npm install

Setup Development Environment

Change vmSrcOrg to your local scratch-vm directory in ./scripts/setup-dev.js then run setup-dev script to setup development environment.

npm run setup-dev

Bundle into a Module

Run build script to bundle this extension into a module file which could be loaded on Xcratch.

npm run build

Watch and Bundle

Run watch script to watch the changes of source files and bundle automatically.

npm run watch

Test

Run test script to test this extension.

npm run test

🏠 Home Page

Open this page from https://yokobond.github.io/xcx-mp-hand/

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.