haathWebXR

Frequently asked questions

What is haath? #

haath (npm package @treefour/haath) is an open-source JavaScript and TypeScript library for WebXR hand tracking and gesture recognition. It reads the standard WebXR hand joints each frame and reports finger signs, punches, slaps, claps, circles, and two-hand gestures. It has zero runtime dependencies and is MIT licensed.

No. Hardhat is an Ethereum development tool. haath is a WebXR hand tracking library by Tree Four Studio. The name means "hand" in Hindi and Urdu. Search for "haath webxr" or "@treefour/haath" to find it.

Which engines does haath work with? #

Any engine that gives you a WebXR XRFrame: Three.js, Meta's Immersive Web SDK (IWSDK), Babylon.js, React Three Fiber, PlayCanvas, Wonderland Engine, or a raw WebXR loop. haath never imports an engine.

Which headsets are supported? #

Any browser with the WebXR Hand Input API. It is developed and tuned on Meta Quest 2, 3, and 3S in the Meta Quest Browser.

How do I detect a punch in WebXR? #

Call haath.update() every frame and check haath.state.right.gesture === 'punch'. haath promotes a fist to punch when the hand moves faster than 1.3 m/s. Use testHandSphere() to check that the punch actually touched a target.

How do I detect hand gestures like thumbs up or pinch? #

Read haath.state.left.sign or haath.state.right.sign. Values include fist, open, gun, poke, pinch, thumbsup, thumbsdown, rock-horns, and telephone (shaka). For a hold-to-confirm, wrap the sign in a HoldRecognizer.

Can I test hand tracking without a headset? #

Yes, in two ways. updateFromPoses() runs the full pipeline on recorded or synthetic joint data, with no WebXR at all. The @treefour/haath/emulator entry point adds hand panels and keyboard control to IWER emulated hands in a desktop browser.

Does haath recognize sign language? #

The v2 engine includes an ASL static alphabet pose pack with confidence scores. It covers static hand shapes, not full signed sentences.

Is haath free for commercial use? #

Yes. haath is MIT licensed.

How fast is haath? #

Per-hand classification is a fixed pass over 25 joints, and the per-frame path allocates no memory. It runs inside 72 to 120 Hz render loops on Meta Quest.

Last updated 2026-11-16