-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
GLTFLoader: Clean up buildNodeHierarchy #15587
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
Conversation
| } else { | ||
|
|
||
| console.warn( 'THREE.GLTFLoader: Joint "%s" could not be found.', skinEntry.joints[ j ] ); | ||
|
|
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.
Any idea why we have the outer IIFE (starting with the return ( function() {... on line 3132? This is nested deeply enough that it's hard to read for me; removing the IIFE might help, or perhaps moving some of the skin-related code into a helper function here.
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.
Seems like from #15350
I agree that's cleaner, but I do have one concern. If the scene graph looks like this... ... and each mesh has its own textures, are we going to request those textures serially? It looks like the child meshes will not begin loading their textures until the parent mesh has finished. Similar issue if each mesh referenced a different Maybe this is uncommon, and meshes usually are children of non-mesh nodes? |
|
Good point. Let me try to think how to resolve... |
|
Any updates on this PR? It seems the concerns of @donmccurdy are not yet addressed, right? |
|
Yes, you're right. I've been a bit too busy so give me time. Or does this PR block any other PRs? |
|
Not that I'm aware of. I just wanted to check the status of this PR 😇 . Sometimes, issues are already solved with different ones... |
|
Closing this for now. |
This PR cleans up
buildNodeHierarchy()inGLTFLoader.Changes
Skeletoninitialization to.loadNode()from.loadScene(). With this change.getDependency('node', nodeIndex)will return a node (Three.js object) with children underneath..loadScene()will be much simplernodeDef.children. Fixes GLTFExporter reorders children in groups. #15561