Matter.js Rigid Body Simulation

Interactive Physics Playground with Custom Shape Drawing

How to Use:

  • Left Click: Add a default box to the simulation
  • Right Click: Add a ball to the simulation
  • Drag: Rotate the view (when enabled)
  • Use buttons to add preset shapes
  • Draw custom shapes using the draw mode

Simulation Controls

Add Preset Shapes

Custom Shape Tools

Click to place points. Double-click to finish drawing. Right-click to cancel.

Physics Parameters

Scene Elements