Lab

Googly Eyes.

Googly eyes, without the glue. Drag them around or shake them. On a phone, tilt it. Or turn on the camera and wear a pair yourself: the face detection runs in your browser, and the picture never leaves your device.

Original on CodePen (opens in a new tab)

How it’s built

A rewrite of an old CodePen that ran on Matter.js and PoseNet. Now it’s a few lines of physics on Canvas 2D, and face detection only loads when you switch the camera on.

Tech
Canvas 2D · Pointer Events · Device Motion · getUserMedia · MediaPipe face detection
Source
2230 lines · 91.2 kB