Dev builds gravity physics demo mixing DOM text and canvas with deviceorientation

jh3yy · x · 2026-10-07

Developer jh3yy shared a playful front-end experiment: using the deviceorientation API to read device tilt and feed gravity into a physics simulation, where DOM text and blocks on a <canvas> roll and collide as you move the phone. A neat reference for anyone exploring sensor-driven physics effects on the web.

Original post →

More from Fun

Fun channel →