Wave opens a liquid portal
Palm speed paints a low-res field that swirls on its own, lingers, then fades.
Design engineering · 2026 · personal
A wardrobe that answers back.
Wave, and it follows your hands. Clap, and the world changes. Punch, and the glass breaks.
The kit
iPhone 12 the eye
On a low stand at the bottom edge of the screen, facing the room. Continuity Camera makes it a webcam in Chrome, with no app to install.
MacBook Air the brain
One Chrome tab does everything: tracking, listening, and drawing every frame in WebGL.
1080p projector the light
Over an HDMI cable. Wireless mirroring added a delay you could see, and a mirror that lags isn’t a mirror.
100-inch screen the glass
Hung on the wardrobe. On a real mirror your face is half its real height, so the reflection starts at half life size.
How it’s engineered
01 Capture
One camera stream, opened once. On first run the picker goes looking for the iPhone.
02 Shrink and brighten
Tracking never sees the full frame: a 512-pixel copy, brightened, sees more in a dark room and costs less.
03 Track
Hands and the person mask take turns, one per camera frame, so the page stays free. The mask only runs when a world needs it.
04 Read the body
Landmarks become gestures: a fist is every fingertip closer to the wrist than its middle joint; a punch is a fist that suddenly grows.
05 Listen
Claps are heard on the audio thread, so they still land when tracking keeps the page busy. A clap is noise: loud, sudden, and crossing zero far more often than a voice.
06 Draw
WebGL2, two passes. A low-resolution field remembers where hands moved and swirls it with curl noise; the main pass lays the camera, the world, the portal, the wipe and the shatter over each other.
07 Project
The picture is flipped so it reads as a reflection, fitted to the screen by four corners, then sent full screen onto the projector itself.
01 Capture. One camera stream, opened once. On first run the picker goes looking for the iPhone.
const stream = await navigator.mediaDevices.getUserMedia({ audio: false, video: { deviceId: deviceId ? { exact: deviceId } : undefined, width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { ideal: 60 }, },});// First run: prefer the iPhone (Continuity Camera) if it's thereconst phone = (await listCameras()).find(c => /iphone/i.test(c.label));if (phone && phone.deviceId !== state.camera) await startCamera(phone.deviceId);02 Shrink and brighten. Tracking never sees the full frame: a 512-pixel copy, brightened, sees more in a dark room and costs less.
// Tracking looks at a small, brightened copy of the frame: cheaper,// and it sees more in a dark room.const ts = lastTs = Math.max(now, lastTs + 1); // MediaPipe needs strictly rising timestampsdet.width = 512;det.height = Math.round(512 * video.videoHeight / video.videoWidth);detCtx.filter = `brightness(${opts.boost}) contrast(${1 + (opts.boost - 1) * .25})`;detCtx.drawImage(video, 0, 0, det.width, det.height);03 Track. Hands and the person mask take turns, one per camera frame, so the page stays free. The mask only runs when a world needs it.
// Hands and the person mask take turns, one per camera frame,// so the page stays responsive.const needMask = scene === AURA || (mix > 0 && next === AURA) || shatter?.to === AURA;if (!needMask) hasMask = 0;turn = needMask ? 1 - turn : 1;if (turn === 0 && segmenter) { segment(ts); return; }if (hands) trackHands(now, ts);04 Read the body. Landmarks become gestures: a fist is every fingertip closer to the wrist than its middle joint; a punch is a fist that suddenly grows.
const fist = [[8, 6], [12, 10], [16, 14], [20, 18]] .every(([tip, pip]) => dist(p[tip], p[0]) < dist(p[pip], p[0]) * 1.05); // Punch: a fist that suddenly grows (coming at the camera) or flies fastconst smallest = Math.min(...h.history.map(e => e.size));const growth = h.size / smallest, speed = Math.hypot(h.vel.x, h.vel.y);if (h.fist && cooled(now) && ((growth > 1.55 - opts.punchSens * .35 && h.size > .1) || speed > 3.2 - opts.punchSens * 1.4)) { doShatter([h.palm.x, h.palm.y]);}05 Listen. Claps are heard on the audio thread, so they still land when tracking keeps the page busy. A clap is noise: loud, sudden, and crossing zero far more often than a voice.
class Clap extends AudioWorkletProcessor { process(inputs) { const x = inputs[0][0]; let e = 0, zc = 0; for (let i = 0; i < x.length; i++) { e += x[i] * x[i]; if (i && (x[i] > 0) !== (x[i - 1] > 0)) zc++; } e /= x.length; if (e > this.floor * this.ratio && e > this.minE && zc >= 18 && currentTime - this.last > .3) this.port.postMessage({ type: 'clap', level: Math.sqrt(e) }); // the room's level adapts slowly between claps if (currentTime - this.last > .25) this.floor = Math.max(this.floor * .995 + e * .005, 1e-7); return true; }}06 Draw. WebGL2, two passes. A low-resolution field remembers where hands moved and swirls it with curl noise; the main pass lays the camera, the world, the portal, the wipe and the shatter over each other.
void main() { vec2 flow = fbo(vUv).rg * .012 + curl(vUv * vec2(uAspect, 1.) * 3. + uTime * .15) * .0018 * (.3 + fbo(vUv).b); vec3 v = fbo(vUv - flow); v *= vec3(.955, .955, .978); // motion fades fast, the opening lingers for (int i = 0; i < 4; i++) { if (i >= uN) break; // Stretched along the stroke, so a swipe leaves a long ribbon of liquid float sp = length(uP[i].zw); vec2 d = (vUv - uP[i].xy) * vec2(uAspect, 1.), dir = uP[i].zw / sp; float along = dot(d, dir), across = dot(d, vec2(-dir.y, dir.x)); float g = exp(-(along * along / (1. + sp * 40.) + across * across) / .004); v.rg += uP[i].zw * g; v.b += g * smoothstep(.003, .025, sp) * .55; }}07 Project. The picture is flipped so it reads as a reflection, fitted to the screen by four corners, then sent full screen onto the projector itself.
const perm = await navigator.permissions?.query({ name: 'window-management' });if (perm?.state !== 'denied' && window.getScreenDetails) { const details = await window.getScreenDetails(); screenChoice = details.screens.find(sc => sc !== details.currentScreen) || undefined;}await document.documentElement.requestFullscreen(screenChoice ? { screen: screenChoice } : {});Now you try
A small sketch of the real thing, with your cursor or finger standing in for a hand. Drag to open the portal, then clap or punch.







Three gestures
Palm speed paints a low-res field that swirls on its own, lingers, then fades.
Heard: far above the room’s level, ≥ 18 zero crossings in 128 samples. Seen: palms 2.2 hand-widths apart, then together, within 450 ms.
A fist that grows by about 40% within 300 ms, or flies fast. Shards fall away into a random world.
The worlds
01 / 12












Kaleidoscope
Built in the room
Before the projector came on, a photo stood in for the camera, so every world, the portal and the shatter could be checked at the desk. Hands, punches and real claps needed the real room.
try 1
broke Claps not caught. The projector window stopped responding. Tracking struggled in the dark.
fixed Low-light boost on the tracking copy. Claps moved to the audio thread. Hands and mask take turns.

try 2
broke Full screen froze the picture: Chrome pauses a window it thinks is hidden.
fixed The effects moved into the window that shows them.
try 3
broke I said “Bankai”. Chrome heard “Bangkok”. The separate projector window kept failing.
fixed Voice fixed on the third try. One window that puts itself full screen.

The damage
The film
The setup, how it works, the tests, the worlds. Cut as a vertical reel.
Your turn