Analysis updated 2026-06-24
Build a browser game where characters fall and collide with obstacles using realistic gravity and friction
Create interactive product demos or art experiments where objects bounce and stack on screen
Prototype a puzzle game with stacking, wrecking balls, and destructible structures in the browser
Add rope or joint constraints between objects to simulate cloth, pendulums, or vehicle suspension
| liabru/matter-js | lllyasviel/style2paints | plotly/plotly.js | |
|---|---|---|---|
| Stars | 18,183 | 18,186 | 18,188 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | designer | data |
Figures from each repo's GitHub metadata at analysis time.
Matter.js is a JavaScript library for simulating 2D physics in web browsers and in Node.js. Physics simulation means the library calculates how objects move, collide, bounce, and fall under the influence of gravity, allowing developers to create games, interactive animations, and visual experiments where objects behave like they would in the real world. The library supports rigid bodies (solid objects that don't deform), compound bodies (complex shapes built from simpler ones), concave and convex shapes, physical properties such as mass and density, friction, air resistance, and collision detection. It also handles constraints (like ropes or joints connecting objects), sleeping (pausing simulation for objects that have stopped moving to save processing power), raycasting (detecting what a ray of light would hit), and time scaling (slowing down or speeding up the simulation). There is a built-in canvas renderer that draws the simulation as 2D graphics, and the library works across major browsers as well as on mobile devices via touch input. Matter.js can be installed via npm or included directly in a webpage via a script tag. The engine can be extended through a plugin system. The project includes a large set of demo scenes, things like Newton's cradle, a wrecking ball, cloth simulation, and various stacking challenges, both as code examples and as a live demo gallery.
Matter.js is a JavaScript library that simulates 2D physics in a web browser, objects fall, collide, bounce, and connect with ropes, letting you build games and animations that feel physically real.
Mainly JavaScript. The stack also includes JavaScript, Node.js, Canvas API.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.