From 5a4924728f2d3d5d97aa5f74f48610caf7afdf56 Mon Sep 17 00:00:00 2001 From: w1n5t0n Date: Mon, 23 Mar 2026 23:28:58 +0200 Subject: [PATCH] feat(playground): add MediaPipe hand tracking input with dev panel Hand tracking via webcam as alternative to joystick input: - Right hand tracks 14 derived features (palm XY, finger curls, spread, roll, pitch, pinch) through a separate 14-input MLP - Left hand gesture recognition (1 finger = thumbs up, 2 = thumbs down) with 400ms debounce hold - Split-zone PIP display (no camera feed, skeleton only) with dashed divider and cross-zone dimming - Dual IML architecture: independent imlJoy (2 inputs) and imlHand (14 inputs) with pointer swap, preserving training data per mode - Dev panel (?devmode=true): draggable/collapsible floating panel with sliders for MediaPipe confidence thresholds, smoothing, gesture hold time, world landmarks toggle, and live feature bar monitor - Visual presets always route to joystick IML (prevents dimension mismatch) - Race condition guard on input mode switching --- playground/a-immersive.html | 33 ++ playground/css/a-immersive.css | 261 +++++++++++++++ playground/js/a-app.js | 240 ++++++++++++-- playground/js/ui/dev-panel.js | 222 +++++++++++++ playground/js/ui/hand-tracker.js | 530 +++++++++++++++++++++++++++++++ 5 files changed, 1267 insertions(+), 19 deletions(-) create mode 100644 playground/js/ui/dev-panel.js create mode 100644 playground/js/ui/hand-tracker.js diff --git a/playground/a-immersive.html b/playground/a-immersive.html index c0da7e6..9dcf82c 100644 --- a/playground/a-immersive.html +++ b/playground/a-immersive.html @@ -75,6 +75,20 @@
+ + +
@@ -85,6 +99,10 @@