
▶ Play now: matt869.github.io/shadowHandsVR. Open it in the Meta Quest Browser and press Enter VR. Hands only, no install.
Inspiration
Hand-shadow puppets might be the oldest hands-first game there is: a lamp, a wall and two hands. Kids work out a rabbit or a barking dog without any instructions. Quest hand tracking makes the real thing playable in VR, and it turns tracking into the game mechanic instead of a stand-in for a controller.
What it does
You sit at a desk in a small puppet theatre under a brass lamp. A faint silhouette appears on the paper screen: a rabbit, a wolf, a dragon. Shape your real hands until your shadow matches it. As you get closer, the target's outline warms from grey to glowing orange. Hold the match for a moment and the shadow comes alive. It hops, howls at a rising moon, sprays water or breathes fire, with a warm flash and golden sparks.
- 10 creatures: one-hand animals (bird, rabbit, dog, snail, swan, wolf) and two-hand shapes (deer, elephant, crab, dragon). None of them need crossed fingers.
- A 20-second tutorial on first launch: "Put your hand between the lamp and the wall."
- Story mode, about ten minutes from start to finish, with saved progress.
- Daily Shadow: the same puzzle for everyone each day, with a streak.
- Hands only: seated, everything within arm's reach, menus are fingertip poke buttons.
- Webcam mode: no headset? The same game runs on a laptop, with on-device hand tracking.
How we built it
Shadow Hands is a WebXR app built with three.js, played straight from the Meta Quest Browser and hosted on GitHub Pages.
The score is physical, not a gesture classifier. Each WebXR hand-tracking joint feeds a solid capsule hand (bones, palm, forearm). A spot light casts it onto the wall. A small orthographic camera reads the actual shadow back from the GPU, and the game scores it against the target silhouette using intersection over union:
$$\text{IoU} = \frac{|\,\text{shadow} \cap \text{target}\,|}{|\,\text{shadow} \cup \text{target}\,|}$$
So any hand shape that throws the right shadow counts. There's no "correct" pose to memorize, just like with a real lamp.
- Lit reference per pixel: each pixel is compared with the brightest it has ever been, so the lamp's fall-off at the edges is never mistaken for shadow.
- Hold-to-lock: keep the match for 1.25 s. A forgiving decay absorbs tracking jitter.
- Webcam mode: Google's MediaPipe Hand Landmarker finds 21 points per hand and maps them onto the same capsule hand, so both modes share one scorer.
- Offline and private: three.js and MediaPipe are bundled in the repo with verified checksums. The page loads nothing from other sites, and webcam frames never leave the device.
- Original assets: every silhouette, sound effect and the music-box soundtrack is generated by a Python script in the repo.
- Automated testing: a Playwright script plays the whole game in headless Chrome with real shadows: the tutorial, all 10 levels, Daily mode, pause and resume, and rejecting wrong shapes. A second script tests the VR path with Meta's Immersive Web Emulation Runtime (IWER) on an emulated Meta Quest 3 with hand tracking. It covers entering VR, tracked joints casting shadows, a fingertip poke, a level locking inside the session, and taking the headset off and on.
Challenges we ran into
- Switching platforms mid-competition. We first built Shadow Hands in Unity 6 with the Meta XR SDK. Then we found out the Meta Developer Dashboard isn't available in the Philippines, so we couldn't submit the APK. We rebuilt the game for WebXR in a couple of days with the same 10 levels and the same scoring.
- three.js layer traps. Shadow casters and lights are filtered by the viewing camera's layers, and the XR eye cameras only render layer 0. Getting a hidden scoring camera to see the shadow while the player sees the right scene took careful layer bookkeeping.
- Frame-rate-dependent holds. The hold timer first counted shadow readings, so a 1.25 s hold took about 13 s on slow devices. Now the hold and the meter smoothing run on real time, and the hold freezes if readings stop.
- The lamp's own shadow. Its fall-off darkened the edges of the wall and counted as "shadow" until we added the per-pixel lit reference.
- A bug that would have broken webcam mode for everyone. An import resolved relative to the wrong folder. The automated test caught it before release.
Accomplishments that we're proud of
- Scoring based on physics. Players work out their own hand shapes instead of copying a pose.
- The payoff moment: the shadow you're holding turns into a living creature.
- A full game (tutorial, story, daily mode, music) that runs from a single link with no install.
- End-to-end automated tests, including the VR path on an emulated Quest 3.
What we learned
- When the input is your body, the best feedback is continuous. The warming outline and the match meter teach the game better than any text.
- Tracking jitter is a design problem as much as a technical one. Forgiving holds and shapes without crossed fingers matter more than raw accuracy.
- WebXR is a real distribution path. One link puts the game in front of anyone with a Quest.
What's next for Shadow Hands
- A two-player puppet theatre over shared spatial anchors.
- Record-your-own silhouettes to challenge friends.
- Storytelling mode: your shadows act out a narrated tale.
- More creatures, playtesting on real headsets to tune difficulty, and a Quest Store release.