case study
Air Canvas
Draw in the air with your finger: hand-tracked painting that runs entirely in your browser, with no backend. Your index finger draws, two fingers lift the pen, and the PNG export un-mirrors your writing so it reads the right way round.
The entire interface is two finger positions
There's no gesture model in this one. Whether a finger is up is decided by comparing two of its own landmarks (the tip against the middle joint), and the whole control scheme is built from two of those tests: your index finger alone draws, and index plus middle together lift the pen so you can move without leaving a line. That's deliberately the simplest thing that works. A trained classifier would be a heavier dependency, another way to fail, and a worse fit, because what the interface needs isn't recognition of a named pose but a binary that flips crisply while your hand is moving.
The fingertip wobbles even when the hand is still
Hand tracking is good enough that tracking isn't the hard part. The fingertip position it returns wobbles by a few pixels from frame to frame even when you hold your hand still, and a line drawn straight from those coordinates looks like it was drawn during an earthquake. So the pen position is an exponential moving average of the raw one, weighted 0.55 toward where it already was. That number is a straight trade: go higher and strokes get smoother but the pen lags behind your finger, go lower and it tracks tightly but reproduces the shake.
Mirrored to draw, un-mirrored to save
The front-camera view is mirrored so that moving your hand right moves the pen right. Without that, drawing turns into an exercise in reversing your own movements. But the moment you export the picture, the same flip is wrong, and anything you wrote comes out backwards. So the save path draws the canvas through a horizontal flip before encoding the PNG, and the exported file reads correctly while the live view stays intuitive.
The unglamorous half
A camera reports one resolution when the stream opens and often a different one a moment later when it settles, which resizes the canvas. Resizing a canvas clears it, so a stroke drawn in the first second used to vanish. Now the drawing is copied into a scratch canvas and drawn back at the new size. Beyond that, this project shares its sibling's lessons on purpose: the GPU delegate falls back to CPU instead of failing setup and blaming the network, the WASM runtime and model are self-hosted so nothing is fetched from a CDN at runtime, and the theme token block has the same shape as the ones in the gesture demo and Lekh Patro, so the three read as one family. The colour and brush groups are labelled for screen readers, the white swatch gets a border so it stays visible on the light toolbar, and reduced motion is honoured.