Serve it, don't open it.
Browsers only grant camera access on secure origins. Double-clicking the file gives you a file:// page, and the camera request fails there every time.
Start a local server.
From the folder holding index.html, run one of these, then open localhost:8000.
python3 -m http.server 8000 # or npx serve .
localhost counts as a secure origin, so the camera prompt appears normally. On any other machine you need real HTTPS.
File layout.
handwave/
index.html 01 wave to begin
tracking.html 02 how it reads a hand
tuning.html 03 tuning
running.html 04 running it
assets/
style.css shared tokens and layout
gesture.js camera, model, gestures, HUD
The HUD is built by the script, not written into the markup, so a new page needs three things: the stylesheet, the script tag, and its filename added to the PAGES array at the top of the module. Order in that array is the order swipes move through.
Camera across page loads.
Each page is a real navigation, so the video stream and the model are torn down and rebuilt every time. The permission itself is remembered per origin, which is why only the first page asks. A flag in sessionStorage tells later pages to start the camera without waiting for a click, and a backwards swipe scrolls you to the bottom of the page you land on so you continue where you were reading.
The model file is fetched from a CDN and then cached, so the first load is the slow one. Serving it yourself removes the network dependency entirely, if you need this to work offline.
When it will not track.
Backlight
A window behind you turns your hand into a silhouette. Face the light instead.
Too close
Fingertips out of frame means missing landmarks. Half a metre back is about right.
Sideways hand
Extension is measured vertically. Keep the palm upright and facing the lens.
Low frame rate
Switch the delegate from GPU to CPU if the GPU path fails silently on your machine.
Where to take it next.
Two hands for zoom, using the distance between wrists. A dwell-to-click, where a pinch held still over a link for a beat follows it. Or the honest ergonomic answer: gesture control is wonderful for a talk and tiring for an afternoon, so anything you build this way should still work perfectly well with a keyboard.