A more robust fix that doesn't depend on hardcoded indices#5340
Merged
dmarcos merged 4 commits intoaframevr:masterfrom Jul 20, 2023
Merged
A more robust fix that doesn't depend on hardcoded indices#5340dmarcos merged 4 commits intoaframevr:masterfrom
dmarcos merged 4 commits intoaframevr:masterfrom
Conversation
Contributor
vincentfretin
left a comment
There was a problem hiding this comment.
@dmarcos doesn't want arrow function in the code base :p
Contributor
Author
|
ofc, sorry. Frustrating that we don't lint for this. |
vincentfretin
approved these changes
Jul 19, 2023
dmarcos
reviewed
Jul 19, 2023
Member
|
Thanks so much! |
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.
Description:
Background here:
701477d
I thought this was a bug, so I prespared a fix. Looks like this was actually due to an issue with my test environment. Neverthless, I think this version of the code is more robust and should be more resilient to future changes in how GLB models get loaded.
Changes proposed:
Having hardcoded assumptions about the order that Bones vs. SkinnedMesh will appear in the three.js object tree makes the code vulnerable to changes in future. This version of the code doesn't make such assumptions, and so should be more robust in future.