Jump to content

Loading textures delays animations


FlashyGoblin
 Share

Recommended Posts

Has anyone had any problems with scene animations running while loading textures? I have a .babylon scene loading. Then when the scene is ready, I start an animation, while loading some additional textures. (The reason is that I want the scene to load with low res textures for faster start up, and then load higher res textures later.)

It seems that whenever a texture is loading, it delays any animations from running (like the camera transitions) until the textures are finished loading. Even when an animation is started before the load, it will wait till all loading is finished, and then does the animation. This becomes a problem when we want to initially show the scene animate things while the high res textures are loading.

Link to comment
Share on other sites

13 hours ago, Deltakosh said:

Hey

this is because of this line:

https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.scene.ts#L1209

 

The animation engine will not start until everything is ready. Just set scene._pendingData = [] should fix your issue

Thanks David! However that doesn't seem to do the trick. I'm animating the camera when the scene is ready via an animation. I start the animation right away, and then I start loading new textures. Only after the textures are finished loading does the camera animation start. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...