Animations won't play while textures are loading

I’ve just noticed if there’s a scene where textures are loading and you try to run an animation, the animation will not play until all textures have loaded. In fact, even if you start the animation first before texture loading, the animation still will not play until the last texture has loaded.

Here’s an example:
https://playground.babylonjs.com/#BCU1XR#867

Is there a way to make animations and texture loading running at the same time?

You can do:

scene.resetLastAnimationTimeFrame();

https://playground.babylonjs.com/#BCU1XR#868

Which will set the scene’s _animationTimeLast to the current time (which is BABYLON.PrecisionTime.Now):

Initially it’s not set, and then this code returns if there is pending data:

It should be added to the documentation

2 Likes

Thank you my friend. That worked perfectly!

1 Like