-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PhysicsPlugin refactor #13279
PhysicsPlugin refactor #13279
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13279/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/13279/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/13279/merge#BCU1XR#0 |
Visualization tests for webgl2 have failed. If some tests failed because the snapshots do not match, the report can be found at If tests were successful afterwards, this report might not be available anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll review it fully tomorrow morning. The first thing I noticed - there is no need to add V1 or V2 to the exported modules. Importing the right ones from the right directory will be enough when developing core. for UMD users there will be a conflict if they are named the same. For that you can use export A as B
, similar to the way this is exported:
Before I deep dive in the PR, the main question is how big of a breaking change it is for the existing users both UMD and ES6 users ? |
This is a question for @RaananW as I don't want to say incorrect things |
@RaananW any update on the back compat ? |
Sorry! totally missed the question. Yes, this is a breaking change for the es6 users, since the files have moved. Of course, another solution is to only have a v2 folder and move the v1 files back to their original position. |
@RaananW and @CedricGuillemet, I let you chose as I do not have any preferences but would like one or the other if possible :-) |
PhysicsPlugin refactor Former-commit-id: 9578993bf8e3848348877d632a053f0b18e0c281
Goal of this PR: move physics to v1, add v2 folder. keep existing working (back compat).
All current physics moved to
physics/v1
. New stuff inphysics/v2
. Shared things are inphysics/
PhysicsAggregate
that will contain a body, a material and a shape that can be created by 1 call (just like existing v1)On the Babylon side, Material, shape, body are opaque proxies. Real work is done in the plugin. Plugin stores its references thanks to
public _pluginData: any = undefined;
PhysicsViewer, mesh,....still using v1.
Tested with PG from documentation and PhysicsDebug Viewer.