ben
@box2d/benchmark
npm i @box2d/benchmark
ben

@box2d/benchmark

Full blown Box2D Ecosystem for the web, written in TypeScript

by Santo Pfingsten

0.10.0 (see all)License:ISCTypeScript:Built-In
npm i @box2d/benchmark
Readme

@box2d/benchmark

A benchmark to compare various js/ts Box2D implementations.

Try it here: https://lusito.github.io/box2d.ts/

Fair Warning: In theory this can be added as a dependency to other physics libraries in order to run benchmarks against local code. But this has not been tested yet.

Based on bench2d by joelgwebber

Example output using node.js v12.16.3

Nameavg ms/frame5th %ile95th %ileRatio
box2d.js2.75241.00
box2d-web4.68461.71
@box2d/core9.231093.36
box2d-html511.5910134.22
@flyover/box2d18.3316216.68
planck.js23.3919288.52

Example output using Firefox 81

Nameavg ms/frame5th %ile95th %ileRatio
box2d-web13.701081.00
@box2d/core15.1016121.10
box2d-html519.1216401.40
box2d.js23.0837201.69
@flyover/box2d25.8938231.89
planck.js111.9064408.17

Example output using Chrome 86

Nameavg ms/frame5th %ile95th %ileRatio
box2d.js5.47661.00
box2d-web6.96661.27
@box2d/core10.051071.84
box2d-html511.0511102.02
@flyover/box2d17.8320173.26
planck.js23.1725184.23

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 by joelgwebber
  • Controllers: From the LiquidFun project
  • Particles: Also from the LiquidFun project
  • Lights: ported from LibGDX
  • DebugDraw: Debug drawing using a canvas
  • Testbed: A set of demos, partially ports of the original projects, partially new ones.

Contributing

We're looking for contributors to make this the best place to start with box2d on the web. Check out the project page for more information: https://github.com/Lusito/box2d.ts

Downloads/wk

14

GitHub Stars

28

LAST COMMIT

8mos ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

12

OPEN PRs

0
VersionTagPublished
0.10.0
latest
24d ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate