Physics engines compared
Layer: Physics. In the list: Matter.js (2D) and Rapier (2D and 3D). Added: Planck.js (Box2D port), cannon-es, Jolt Physics and Ammo.js. Part of Open-source motion studio: 20 repos. Dates checked 2026-10-27 through GitHub and npm.
| Matter.js | Rapier | Planck.js | cannon-es | Jolt Physics | Ammo.js | |
|---|---|---|---|---|---|---|
| Dimensions | 2D | 2D and 3D | 2D | 3D | 3D | 3D |
| Core language | JavaScript | Rust (WASM for JS) | JavaScript (Box2D port) | JavaScript | C++ | Bullet compiled to JS/WASM |
| License | MIT | Apache-2.0 | MIT (npm) | MIT | MIT | Other (see its GitHub page) |
| Latest | npm 0.20.0 (2024-06-23); pushed 2026-09-30 | npm 0.21.0 (2026-09-25) | npm 1.5.1 (modified 2026-10-12) | npm 0.20.0; last push 2024-01-06 | pushed 2026-10-26 | pushed 2026-09-22 |
Which one when
- Playful 2D stacking and collisions, simple API: Matter.js; release cadence is slow.
- Box2D-accurate 2D behaviour: Planck.js.
- 3D, or 2D and 3D from one engine, with a WASM build for the browser: Rapier.
- Simple 3D in JavaScript only: cannon-es, but its last push is 2024-01, so check it works with your stack.
- A high-performance native 3D engine in C++ (games, simulation): Jolt Physics.
- Bullet’s feature set in the browser: Ammo.js.
For scripted video, a physics step is usually baked into keyframes ahead of time and the renderer replays the result; a live engine is only needed when motion must react at run time.