-
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
Make SceneLoader module level functions PascalCase and add GetRegisteredSceneLoaderPluginMetadata #16154
Make SceneLoader module level functions PascalCase and add GetRegisteredSceneLoaderPluginMetadata #16154
Conversation
ryantrem
commented
Feb 6, 2025
•
edited
Loading
edited
- To make the SceneLoader module more consistent with the rest of the API, I am updating the module level functions to be PascalCase. The camalCase ones are marked as deprecated, and the new PascalCase ones are not marked as experimental.
- Also marking the SceneLoader class as deprecated, suggesting using the module level functions instead.
- Exposing a new function GetRegisteredSceneLoaderPluginMetadata to get the metadata of the registered SceneLoader plugins. I want to use this for tooling like Sandbox so it doesn't have to hardcode a list of supported extensions. This adds no state, so it should have zero bundle impact for consumers that don't use it.
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://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16154/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16154/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/16154/merge#BCU1XR#0 |
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
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.
Not sure of the rename for case only but not against it either :-)
Since in recent discussions there was agreement to use PascalCase as the standard for module level functions, I thought it was worth fixing, especially since they are marked as @experimental. But I'm fine either way. @RaananW, @deltakosh, do you have an opinion on this one? |
If they were experimental, I guess we could rename and mark as breaking change ? |
Yes, this is an option as well. I went this way because the old camalCase calls the new PascalCase ones, which means it has zero impact on bundle size for anyone using the new PascalCase ones. So it seems like "cheap" back compat that maybe avoids any community frustration. That said, it also pollutes intellisense a bit when you do the import (since you will see both the camalCase and PascalCase). |
…get merged with the description
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://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16154/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16154/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/16154/merge#BCU1XR#0 |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |