Turn a pinch into a pointer
From webcam hand positions to drawings and objects on a projected canvas.
A hand-controlled projector workspace.
Canvas / MediaPipe
The problem
A projector can show a workspace, but interacting with it usually sends you back to a mouse. Arc Wall uses a webcam to track hands and a canvas to draw the scene. The laptop remains the control desk, with a separate projector window.
How it works
- WebcamHand landmarks
- GesturePointer + pinch
- CanvasWall mapping
Find the hand's landmarks
MediaPipe estimates hand landmarks, points such as fingertips and knuckles. The gesture interpreter mirrors those coordinates and smooths the index fingertip position to reduce pointer jitter.
Interpret a pinch
Thumb-to-index distance is compared with palm size. Different engage and release thresholds help prevent flickering between pinched and open. The same pointer can grab objects, draw, or erase; two open hands can resize a selected object.
Fit and share the canvas
Four corner handles define a perspective transform, a mapping from a rectangle to a wall shape. The code rejects crossed or collapsed corners. The control and output windows share scene changes through BroadcastChannel, a browser messaging channel.
Decisions & tradeoffs
Normalize to the hand
Using palm size makes pinch detection relative to the visible hand rather than a fixed pixel gap. Tracking still depends on what the camera can see.
Keep the core interaction local
Drawing and local commands do not need a model account. The two windows need the exact same origin and browser profile. The animated scene is a visual effect, not a physical hologram.
Try it yourself
From an Arcwall checkout, with Node.js 20.9+ and npm, start the local studio. No AI configuration is needed for drawing or local commands.
npm ci
npm run devOpen http://127.0.0.1:8787. Draw with the mouse, try Undo, then try “add a circle.” Hand tracking needs camera permission. Use Launch projector only when you want the second window; drawing also works on the laptop.
Sources & scope
No local checkout was available. The public README and interaction source were read directly. This note covers the drawing and projection path.