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

A more robust fix that doesn't depend on hardcoded indices #5340

Merged
merged 4 commits into from
Jul 20, 2023

Conversation

diarmidmackenzie
Copy link
Contributor

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.

Copy link
Contributor

@vincentfretin vincentfretin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmarcos doesn't want arrow function in the code base :p

@diarmidmackenzie
Copy link
Contributor Author

ofc, sorry.

Frustrating that we don't lint for this.

@dmarcos
Copy link
Member

dmarcos commented Jul 20, 2023

Thanks so much!

@dmarcos dmarcos merged commit d4c1b87 into aframevr:master Jul 20, 2023
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

Successfully merging this pull request may close these issues.

3 participants