Repolode
piqnt

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