handible
Version:
Revolutionary hand tracking and gesture control for the web. Transform any webcam into a powerful 3D controller with MediaPipe and Three.js.
227 lines (161 loc) โข 7.24 kB
Markdown
<div align="center">
<img src="./assets/logo.png" alt="Handible Logo" width="120"/>
# H a n d i b l e
**Revolutionary hand tracking and gesture control for the web**
*Transform any webcam into a powerful 3D controller*
---
[](https://www.npmjs.com/package/handible)
[](./LICENSE)
[](https://github.com/gust10/Handible)
[](https://demo.handible.dev)
[](https://threejs.org/)
[](https://mediapipe.dev/)
[](https://www.khronos.org/webgl/)
</div>
<br/>
<div align="center">
### โจ **60fps Real-time** โข ๐ **Web-based** โข ๐ **Zero Setup**
</div>
---
## ๐ฌ Demo
<div align="center">
```bash
npm install handible
```
**[๐ Documentation](https://docs.handible.dev)** โข **[โก Try Demo](https://demo.handible.dev)** โข **[๐ Get Started](https://docs.handible.dev/getting-started)**
</div>
<!--
TODO: Add demo GIF/video here

-->
## ๐ Why Handible?
**Handible** makes hand tracking accessible to every developer. No expensive hardware, no complex setupโjust your webcam and imagination. Super easy to use.
```javascript
import { startGestureControl, isPinching2D } from 'handible';
// ๐ Start tracking
await startGestureControl(videoElement, scene);
// ๐ฏ Detect gestures
if (isPinching2D(0)) {
console.log('Hand 0 is pinching! ๐ค');
}
```
<div align="center">
<table>
<tr>
<td align="center">๐ฅ<br/><b>Webcam Only</b><br/>No special hardware</td>
<td align="center">โก<br/><b>60fps Performance</b><br/>Real-time tracking</td>
<td align="center">๐ฏ<br/><b>21 Hand Points</b><br/>Precise detection</td>
<td align="center">๐ง<br/><b>Easy Integration</b><br/>Drop-in solution</td>
</tr>
</table>
</div>
## ๐ Features
### ๐ฎ **Core Capabilities**
- **๐ค Pinch Detection** - Precise finger-to-thumb interactions
- **๐ Palm Recognition** - Detect palm orientation and facing direction
- **๐ 3D Hand Tracking** - Real-time 21-point hand landmarks
- **๐ฏ Multi-Hand Support** - Track up to 2 hands simultaneously
- **๐จ Surface Interaction** - Virtual buttons, sliders, and UI panels
### ๐ ๏ธ **Developer Experience**
- **๐ฆ Zero Config** - Works out of the box with Three.js
- **๐ง Modular API** - Use only what you need
- **๐จ Customizable** - Extensive styling and behavior options
- **โก Performance Optimized** - GPU-accelerated tracking
## ๐ฆ Installation
```bash
# npm
npm install handible
# yarn
yarn add handible
# pnpm
pnpm add handible
```
## โก Quick Start
### 1. **Basic Setup**
```javascript
import { startGestureControl, setSceneObjects } from 'handible';
// Initialize hand tracking
const videoElement = document.querySelector('#video');
const scene = new THREE.Scene();
await startGestureControl(videoElement, scene);
setSceneObjects(scene, camera, renderer);
```
### 2. **Detect Gestures**
```javascript
import { isPinching2D, getHandPosition } from 'handible';
// Check for pinch gesture
if (isPinching2D(0)) {
const position = getHandPosition(0);
console.log('Pinching at:', position);
}
```
### 3. **Surface Interactions**
```javascript
import { SurfaceInteractionSystem } from 'handible';
// Create interactive surface
const surface = new THREE.Mesh(geometry, material);
SurfaceInteractionSystem.registerSurface(surface, {
width: 2,
height: 1.5,
cursorScaleFactor: 3.0
});
```
## ๏ฟฝ Documentation
| Section | Description |
|---------|-------------|
| **[๐ Getting Started](https://docs.handible.dev/getting-started)** | Installation and basic setup |
| **[๐ก Core Concepts](https://docs.handible.dev/core-concepts)** | Understanding gestures and tracking |
| **[๐ API Reference](https://docs.handible.dev/api-reference)** | Complete function documentation |
| **[๐ฏ Advanced Features](https://docs.handible.dev/advanced-features)** | Surface systems and custom interactions |
## ๐ฏ Use Cases
<div align="center">
<table>
<tr>
<td align="center">๐ฎ<br/><b>3D Games</b><br/>Natural hand controls</td>
<td align="center">๐จ<br/><b>Creative Tools</b><br/>Gesture-based design</td>
<td align="center">๐<br/><b>Data Visualization</b><br/>Interactive exploration</td>
<td align="center">๐ซ<br/><b>Education</b><br/>Immersive learning</td>
</tr>
<tr>
<td align="center">๐๏ธ<br/><b>E-commerce</b><br/>Product interaction</td>
<td align="center">๐ฅ<br/><b>Healthcare</b><br/>Touchless interfaces</td>
<td align="center">๐ญ<br/><b>Entertainment</b><br/>Interactive experiences</td>
<td align="center">๐ฌ<br/><b>Research</b><br/>Gesture analysis</td>
</tr>
</table>
</div>
## ๐ ๏ธ Built With
- **[Three.js](https://threejs.org/)** - 3D graphics and rendering
- **[MediaPipe](https://mediapipe.dev/)** - Real-time hand tracking
- **[WebGL](https://www.khronos.org/webgl/)** - GPU-accelerated performance
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.
<div align="center">
**[๐ Report Bug](https://github.com/gust10/Handible/issues)** โข **[๐ก Request Feature](https://github.com/gust10/Handible/issues)** โข **[๐ฌ Discussions](https://github.com/gust10/Handible/discussions)**
</div>
### Development Setup
```bash
git clone https://github.com/gust10/Handible.git
cd Handible
npm install
npm run dev
```
## ๐ Performance
| Metric | Value | Description |
|--------|-------|-------------|
| **Frame Rate** | 60fps | Real-time tracking performance |
| **Latency** | ~16ms | Input to response time |
| **Hand Points** | 21 | Landmark precision per hand |
| **Max Hands** | 2 | Simultaneous tracking |
## ๐ License
MIT License - see the [LICENSE](./LICENSE) file for details.
## ๐ Acknowledgments
- **MediaPipe Team** - For the incredible hand tracking technology
- **Three.js Community** - For the powerful 3D graphics framework
- **Contributors** - Everyone who helped make this project better
---
<div align="center">
**Made with โค๏ธ by [Hyunsung Shin](https://github.com/gust10)**
*Transform your ideas into gestures*
โญ **Star this repo if you find it useful!** โญ
</div>