{"data":{"slug":"matter-js","name":"Matter.js","tagline":"MIT 2D rigid-body physics, not a Phaser replacement","category":"libraries","categoryName":"Libraries","url":"https://brm.io/matter-js","github":"https://github.com/liabru/matter-js","pricing":"open-source","hook":"Matter.js is the 2D physics engine Phaser already vendors — grab it when you are not on Phaser.","whatsGood":"MIT. 2D rigid bodies, constraints, collisions, sleeping. Drop next to PixiJS, KAPLAY, or a raw canvas. Docs and demos at brm.io/matter-js.","theCatch":"Loud: Phaser already ships Matter physics. If you are on Phaser, you already have this. This gem is for Pixi/KAPLAY/canvas, not a second physics stack inside Phaser. Distinct from Phaser (full engine) and howler.js (audio sprites).","verdict":"The MIT 2D rigid-body lib. Use it off Phaser; on Phaser you already have Matter.","addedAt":"2026-09-03","featured":false,"domain":"Graphics & 3D","subSpecialty":"Physics","capabilities":["physics","2d"],"surfaces":["Self-host"],"ecosystem":["Browser"],"licenseModel":"OSS/MIT","githubStars":18394},"related":[{"slug":"hono","name":"Hono","tagline":"Tiny TypeScript web framework that runs on every runtime"},{"slug":"phaser","name":"Phaser","tagline":"MIT HTML5 2D game framework with scenes, physics, and tilemaps"},{"slug":"pixijs","name":"PixiJS","tagline":"MIT 2D WebGPU/WebGL renderer, not a game engine"},{"slug":"babylonjs","name":"Babylon.js","tagline":"Apache-2.0 3D engine for the web, now on v9"},{"slug":"playcanvas","name":"PlayCanvas","tagline":"MIT WebGL2/WebGPU engine plus an optional hosted Editor"}],"links":{"self":"/api/gems/matter-js","html":"/gems/matter-js","markdown":"/gems/matter-js.md","category":"/api/gems?category=libraries","categoryPage":"/stacks/libraries"}}