Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@box2d/benchmark

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@box2d/benchmark

A benchmark to compare various js/ts Box2D implementations

  • 0.11.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-88.24%
Maintainers
0
Weekly downloads
 
Created
Source

@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

Keywords

FAQs

Package last updated on 17 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc