[compat-sync] More physics support#335
Merged
Merged
Conversation
Lab - Static SiteBuild 20260629.6 - merge @ c1b0987 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR syncs the @babylonjs/lite-compat layer against a newer Babylon.js commit and, in response to issue #332, introduces a real HavokPlugin / PhysicsEngine compat wrapper over Babylon Lite’s existing Havok V2 APIs so Babylon.js-style physics wiring can work through scene.enablePhysics().
Changes:
- Add a
HavokPlugin+PhysicsEnginecompat surface (and matching enum exports) backed by Lite’screateHavokWorld/setPhysicsTimestepAPIs. - Wire Babylon.js-style physics lifecycle methods onto compat
Scene(enablePhysics,getPhysicsEngine,isPhysicsEnabled,disablePhysicsEngine). - Update docs/status and tests to reflect physics being partially supported (and remove
HavokPluginfrom the “unsupported” stubs list).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/babylon-lite-compat/src/physics/physics.ts | New Havok V2 plugin/engine/enums compat wrapper over Babylon Lite physics factories. |
| packages/babylon-lite-compat/src/scene/scene.ts | Adds Babylon.js-like physics enable/query/disable hooks on compat Scene. |
| packages/babylon-lite-compat/src/index.ts | Re-exports the new physics compat surface from the package entrypoint. |
| packages/babylon-lite-compat/src/unsupported/unsupported-extended.ts | Removes HavokPlugin from unsupported stubs; clarifies what remains unsupported. |
| packages/babylon-lite-compat/tests/physics.test.ts | Adds unit tests for the plugin/engine surface and enum values. |
| packages/babylon-lite-compat/tests/unsupported-extended.test.ts | Stops asserting HavokPlugin is an unsupported throwing stub. |
| packages/babylon-lite-compat/README.md | Updates support matrix to reflect partial physics compat support. |
| packages/babylon-lite-compat/COMPAT-STATUS.md | Updates sync SHA/date and documents the new physics compat status. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Lab - Static SiteBuild 20260629.12 - merge @ 8d28ce4 |
…-29-55496 Incorporates the PR #349 physics delta-time fixes now in master: Lite steps a world by the live per-frame delta natively when no fixed step is set. As a result the branch's compat physics wrapper can be much thinner: - Drop the branch's redundant _timestepProvider / setPhysicsTimestepProvider from Lite core and the dead provider block in _stepWorld. This makes packages/babylon-lite identical to master again (the branch's only core change was the now-removed provider). - Slim the compat HavokPlugin to defer to Lite's native frame-delta stepping (remove _computeTimestep); only pin a fixed step when useDeltaForWorldStep is false. - Fix Scene.enablePhysics headless guard to read this._engine._headless (the NullEngine flag lives on the engine after master's NullEngine work). - Resolve COMPAT-STATUS/README doc conflicts. Bundle manifests are unchanged from master: the compat layer does not affect lab scene bundles, and babylon-lite core now matches master, so no manifest regeneration is warranted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Lab - Static SiteBuild 20260706.19 - merge @ eabc5d4 |
CedricGuillemet
approved these changes
Jul 7, 2026
VicenteCartas
pushed a commit
to VicenteCartas/Babylon-Lite
that referenced
this pull request
Jul 7, 2026
…eam/master Merge with upstream/master (BabylonJS#370 hardened bundle-size measurement + loadGltf union/morph WGSL fix; BabylonJS#335 physics). Regenerate my picking scenes with the new measurement: 94/114/115/118/126 shifted, all pass. 114/115 conflicts resolved to master then rebuilt. Full bundle-size gate: 209/209.
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.
Automated sync of
@babylonjs/lite-compatagainst the latest Babylon.js and Babylon Lite changes,produced by the
update-compat-layerskill.Addresses #332.
Synced against BJS commit:
e997d5b66675ec8f8dc212a002aa40fe0d4ec646Validation (run independently by the pipeline)
Changed files
ackages/babylon-lite-compat/COMPAT-STATUS.mdpackages/babylon-lite-compat/README.mdpackages/babylon-lite-compat/src/index.tspackages/babylon-lite-compat/src/scene/scene.tspackages/babylon-lite-compat/src/unsupported/unsupported-extended.tspackages/babylon-lite-compat/tests/unsupported-extended.test.tspackages/babylon-lite-compat/src/physics/packages/babylon-lite-compat/tests/physics.test.ts