Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Loading multiple GLB files with animations fails #1003
I ran into this issue when loading a simple GLB file first and then loading another one with an animation.
After looking into it, I found that the
Sure, it was late yesterday. Here is a minimal example:
This snippet works.
With debugging it can be observed starting here.
Here are the models: resources.zip
Also the error is on the current master branch. I don't know about v3.2.x.
Yeah, it does seem like data is never cleared.
...actually, the fact that the asset loader system was written to keep state like this is dangerous and leaky. I mean, if the loader keeps all of this data around imagine loading a giant ogre or gltf or whatever file and never loading another one of that particular type... all of the data hangs out in RAM for no reason.
Future todo item would be to rewrite loaders to have a clear/reset method or just instantiate them every time instead of keeping thread-locals around. I'm not sure if there is any advantage to keeping them around (and many many disadvantages).