Using a class, you can create a collection of circles that move within the canvas in response to the tilt of a mobile device. You must open this page on a mobile device to display the sketch.
Shake Ball Bounce by p5.js Contributors and the Processing Foundation is licensed under CC BY-NC-SA 4.0.