Skip to main content
JobCannon
All Skills

Matter.js JavaScript Physics

⭐ Tier 1
Category
Tech
Salary Impact
Complexity
Easy
Used in
All careers

Matter.js is a 2D rigid-body physics engine written in JavaScript. You create physics objects (bodies) with properties like mass, friction, and velocity. Matter.js simulates interactions: gravity, collisions, constraints (joints). You render bodies to Canvas or WebGL and users see realistic motion. A simple example: create a box (body), set gravity to 9.8 m/s², drop it. Matter.js computes position each frame. Box falls realistically, bounces off ground (if restitution > 0), gradually stops (if friction > 0).