A cross-platform Java game development framework built on OpenGL ES for desktop, Android, web, and iOS games.
piqnt/planck.js
A JavaScript/TypeScript rewrite of the Box2D 2D physics engine for HTML5 game development.
- Stars
- 5,311
- Forks
- 257
- Open issues
- 31
- Last commit
- 15 days ago
What is it?
Planck.js is a 2D rigid-body physics engine written in JavaScript and TypeScript. It is a port of the Box2D engine, aimed at developers building games and simulations that run in the browser or on mobile web platforms.
The project's goal is to keep Box2D's proven simulation approach while offering code that is easier to read and modify in JavaScript, along with an API designed to feel natural to JavaScript and TypeScript users. It is intended for cross-platform HTML5 games and is tuned for web and mobile performance.
The project provides online examples, full documentation, and a testbed for reproducing issues, and it has a community Discord for questions.
Key features
- 01Rewrites Box2D's 2D physics simulation in JavaScript and TypeScript.
- 02Provides an idiomatic JavaScript/TypeScript API.
- 03Targets HTML5 games running in browsers and on mobile web.
- 04Ships with online examples, documentation, and a testbed.
Use cases
- Adding rigid-body physics such as collisions and gravity to a browser-based 2D game.
- Building 2D physics simulations or demos on the web.
- Porting Box2D-based logic to a pure JavaScript or TypeScript codebase.
In collections
Topics
FAQ
- What is planck.js?
- A JavaScript/TypeScript rewrite of the Box2D 2D physics engine for HTML5 game development. Planck.js is a 2D rigid-body physics engine written in JavaScript and TypeScript. It is a port of the Box2D engine, aimed at developers building games and simulations that run in the browser or on mobile web platforms.
- Is planck.js free to use? What license does it have?
- planck.js is open source under the MIT license. Check the license terms before using it in commercial products.
- Is planck.js still maintained?
- Actively maintained. The last commit to planck.js was on Oct 23, 2026.
- What can I use planck.js for?
- Adding rigid-body physics such as collisions and gravity to a browser-based 2D game. Building 2D physics simulations or demos on the web. Porting Box2D-based logic to a pure JavaScript or TypeScript codebase.
- Where can I get planck.js?
- The source code and installation instructions are on GitHub: https://github.com/piqnt/planck.js
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Godot is a free, MIT-licensed, cross-platform game engine for building 2D and 3D games from one unified editor.
A 2D rigid body physics engine for the web, written in JavaScript and running in browsers and Node.js.
A JavaFX-based Java/Kotlin game framework for building 2D games and UI-heavy apps, with cross-platform packaging.
An ECS-driven 2D and 3D physics engine built specifically for the Bevy game engine in Rust.
No-code, open-source game engine and editor for building 2D, 3D and multiplayer games for mobile, desktop and the web.