@box2d

Work in Progress of a full Box2D ecosystem for the web.

Get Started →

TypeScript port of Box2D and more

This is a TypeScript port of the original Box2D and additionally Box2d Lights and LiquidFun.

Up to Date

This project is kept in sync with the original Box2D project (using a special tool to easily compare differences to upstream)!

Modular Design

You only need to install what you actually want. Don't need particles or 2D lights? Then just install the core.

# What is @box2d?

Work in Progress of a full Box2D ecosystem for the web. This includes TypeScript (opens new window) ports of:

# The @box2d Ecosystem

@box2d is a full-blown ecosystem for box2d for the JavaScript/TypeScript world. It can be used both in the browser and in node.js

Check out demos and compare performance here: https://lusito.github.io/box2d.ts/

Fair Warning: The whole @box2d ecosystem is in an early stage, so it will probably change a lot before we release the first stable version (1.0.0).

Other packages included in the ecosystem:

  • Benchmark: Based on bench2d (opens new window) by joelgwebber
  • Controllers: From the LiquidFun project
  • Particles: Also from the LiquidFun project
  • Lights: ported from LibGDX (opens new window)
  • DebugDraw: Debug drawing using a canvas
  • Testbed: A set of demos, partially ports of the original projects, partially new ones.

# Liberal Licenses

This project has different licenses depending on the project, so make sure you check out each project individually. Most are MIT, but some might differ (for example Box2D Lights uses Apache 2.0). I was not able to only use one license, since some of these projects already had licenses.