
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@box2d/benchmark
Advanced tools
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
Name | avg ms/frame | 5th %ile | 95th %ile | Ratio |
---|---|---|---|---|
box2d.js | 2.75 | 2 | 4 | 1.00 |
box2d-web | 4.68 | 4 | 6 | 1.71 |
@box2d/core | 9.23 | 10 | 9 | 3.36 |
box2d-html5 | 11.59 | 10 | 13 | 4.22 |
@flyover/box2d | 18.33 | 16 | 21 | 6.68 |
planck.js | 23.39 | 19 | 28 | 8.52 |
Name | avg ms/frame | 5th %ile | 95th %ile | Ratio |
---|---|---|---|---|
box2d-web | 13.70 | 10 | 8 | 1.00 |
@box2d/core | 15.10 | 16 | 12 | 1.10 |
box2d-html5 | 19.12 | 16 | 40 | 1.40 |
box2d.js | 23.08 | 37 | 20 | 1.69 |
@flyover/box2d | 25.89 | 38 | 23 | 1.89 |
planck.js | 111.90 | 64 | 40 | 8.17 |
Name | avg ms/frame | 5th %ile | 95th %ile | Ratio |
---|---|---|---|---|
box2d.js | 5.47 | 6 | 6 | 1.00 |
box2d-web | 6.96 | 6 | 6 | 1.27 |
@box2d/core | 10.05 | 10 | 7 | 1.84 |
box2d-html5 | 11.05 | 11 | 10 | 2.02 |
@flyover/box2d | 17.83 | 20 | 17 | 3.26 |
planck.js | 23.17 | 25 | 18 | 4.23 |
@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:
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
FAQs
A benchmark to compare various js/ts Box2D implementations
We found that @box2d/benchmark demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.