I want to stop some AnimationGroup-Items at the same time.
I have some animated characters with a lot of animations which are going on at the same time. At some point I want to stop the animations of them.
This is very slow and my scene is frozen for some seconds.
There are ~100k - 200k animatables (scene._activeAnimatables.length) in my scene.
I have checked the code:
and this:
Turns out that calling this._scene._activeAnimatables.splice(index, 1); on every single instance of Animatable is very slow and causing the issue.
There are some characters loaded with a lot of animations (the animations are starting after loading).
It took 800ms on my system to stop the animations.
There is a little āguiā where you can see everything.
You can change the amount of items to add some more but it will take a while to load.
But I guess 10 items are enough for visualization