Camera Ball

Turns a coloured object in the webcam into physics geometry. MediaPipe selfie segmentation + an HSV colour mask produce a binary image, a chamfer distance transform turns it into a signed distance field, and a Three.js ball bounces off it.

camera-ball POC · 640×480
camera: idle
segmenter: loading
tip: click the camera feed to sample a color
346° → 0° → 14°
hue
0°
tolerance
±14°
sat min
0.45
val min
0.25
purity
0.22
morph close
2×
gravity
1400
normal damp
0.82
tangent damp
0.96
jitter
0.06
min speed
80
sub-steps
3×
ball size
28px
show video
show mask
person only