Bouncing Balls with matter.js

๐Ÿ”— Code Example: Bouncing Ball with matter.js

๐Ÿ”— References:

๐Ÿ”— Timestamps:

  • 0:34 Add matter.js to sketch

  • 1:09 Setup engine and create a ball

  • 6:30 Create a Ball class

  • 10:17 Add random initial velocity

  • 13:07 Add colors

  • 13:58 Remove balls that are off the screen from the physics' world and balls array

  • 22:38 Create a Boundary class

Previous

Springy Chain with matter.js ๐Ÿ”—

Next

Introduction to matter.js ๐Ÿ”ด ๐ŸŸช