Add a Box3D Physics page to the community extensions - #1629
Merged
Merged
Conversation
babylon-box3d is Erin Catto's Box3D compiled to WebAssembly behind a physics v2 plugin, so scenes written for the Havok plugin run on it unchanged. The page covers installation, the script tag and Playground routes, an optional threaded build, the Box3D specific extras, and measured numbers against Havok and Oimo with the caveats that go with them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Popov72
requested changes
Sep 18, 2026
Popov72
left a comment
Contributor
There was a problem hiding this comment.
The page is valuable and the benchmark data matches the repository results, but the copy/paste setup paths and compatibility wording need correction before merging.
Review follow up: - The npm example imports @babylonjs/core/Physics/joinedPhysicsEngineComponent, which is what registers scene.enablePhysics in Babylon 9, and says what goes wrong without it. - The script tag example no longer uses top level await, which is a syntax error in a classic script. - The introduction claims support for most of the Physics V2 API rather than everything, and a new Limitations section lists what differs: the character controller, mesh and height field shapes on static and animated bodies, convex hull and cylinder approximations, how SixDoF constraints map onto Box3D's joints, what COLLISION_CONTINUED reports, and the Havok only shape and proximity queries. - The Playground example builds the benchmark's own scene, the 2D pyramid of 210 unit boxes at 20 rows with the same ground, friction, restitution and 1 tonne boxes, so it matches the table below it. Both snippets were run verbatim in a browser against the published CDN files. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pryme8
added a commit
to Pryme8/babylon-box3d
that referenced
this pull request
Sep 18, 2026
The review on BabylonJS/Documentation#1629 found the same problems here: the script tag example used top level await, a syntax error in a classic script; the npm examples left out the joinedPhysicsEngineComponent import that registers scene.enablePhysics in Babylon 9; the introduction promised everything written for Havok would work unchanged; and the Playground example called a 3D pyramid of 2870 boxes the benchmark scene. The documentation page is synced from the reviewed branch, and the README gets the same fixes. The README also answers a question from the forum: it runs without npm or a build step, from three downloaded files next to the page, the same way Havok's UMD build does, and needs a static server for the same reason Havok does. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Popov72
approved these changes
Sep 18, 2026
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Documentation snapshot uploaded. Snapshot: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/DOCS/refs/pull/1629/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a community extension page for babylon-box3d, which brings Box3D (Erin Catto's 3D successor to Box2D v3, MIT) to Babylon.js as an
IPhysicsEnginePluginV2implementation. Scenes written for the Havok plugin run on it unchanged:PhysicsAggregate,PhysicsBody, shapes, constraints, events and ray casts.The extension is published on npm as
babylon-box3dand the repository carries the tests and the benchmark harness the page's numbers come from.The page covers:
locateFilecase, script tags and a complete Playground sceneconfiguration/structure.jsongets the matching entry, alphabetically insidecommunityExtensions.🤖 Generated with Claude Code