Skip to content
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

Entities are not registered for models loaded using GLTFLoaderPlugin #1504

Closed
jbenhardus opened this issue May 24, 2024 · 2 comments
Closed

Comments

@jbenhardus
Copy link
Contributor

Is this bug fix critical for your commercial enterprise?
We have potential workarounds, but this affects required functionality for our application

Describe the bug
When loading a model in .glb or .gltf format, scene. objects is empty. This prevents the use of methods and properties such as scene.objectIds and scene.setObjectsVisible to show or isolate objects in the scene.

To Reproduce
Steps to reproduce the behavior:

  1. Load a model using GLTFLoaderPlugin, providing urls for src and metaModelSrc
  2. Inspect viewer.scene.objects using a breakpoint or console log statement
  3. viewer.scene.objects is empty and scene.setObjectsVisible does not change visibility of objects

Expected behavior
viewer.scene.objects should be populated, and scene.setObjectsVisible should update the visibility of objects

Screenshots

xeokit-issue.mov

Desktop (please complete the following information):

  • OS: MacOS 14.4.1
  • Browser: Chrome
  • Version: 125.0.6422.61

Additional context
It appears the issue arises because the loadNode function in GLTFSceneModelLoader calls sceneModel.createEntity without specifying the isObject property in the config object (example here). Adding isObject: true to the config fixes the issue I am experiencing

@xeolabs
Copy link
Member

xeolabs commented May 30, 2024

This should be OK now in the latest xeokit-sdk release - please try that and close this issue if it looks good.

@jbenhardus
Copy link
Contributor Author

Thanks! This seems to be working as expected now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants