Skip to content

Box2D physics engine compiled to WebAssembly. Supports TypeScript and ES modules.

Notifications You must be signed in to change notification settings

danbri/box2d-wasm

 
 

Repository files navigation

box2d-wasm

npm version

Box2D compiled to WebAssembly.

Showcase

Usage

Install the box2d-wasm npm package

npm i box2d-wasm

Then check out the documentation.

Alternative distributions

For additional functionality:

  • fluid simulation
  • particle simulation
  • soft-body collisions

You can install from the liquidfun branch like so:

npm i "box2d-wasm@npm:liquidfun-wasm@6.0.4-lf.1"

License

Zlib-licensed.
Links against MIT-licensed code from Erin Catto's Box2D.
Compiles Zlib-licensed code from Alon Zakai's box2d.js.

Project

Compared to the existing box2d.js package: box2d-wasm aims to support Box2D v2.4.0+ and TypeScript.

Developing in this monorepo

See README.dev.md.

About

Box2D physics engine compiled to WebAssembly. Supports TypeScript and ES modules.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 58.6%
  • JavaScript 22.6%
  • Shell 10.0%
  • C++ 4.4%
  • Svelte 3.5%
  • HTML 0.8%
  • CSS 0.1%