There is a delay between the model load using gltfLoader and the scene rendering, how would I know when to hide the loading screen?

I am using threejs 106 build and using webGLRenderer and CSS2DRenderer with my project.

Trying to load a glb model and showing a loading progress based on the onProgress callback of the loader. I hide the loading screen when the loading is 100% complete and call the renderer but rendering the geometries take few seconds to appear on the canvas.

How can I know the assets have been shown on the screen, so that I can hide the loading screen and and not make the delay to appear before the user?

Any help will be greatly appreciated.

When you have added your assets to the scene, you could call WebGLRenderer.compile() and then hide the loading screen.

1 Like

Tried, but it made no difference.

Does the release version used have anything to do with it?

No, compile() should work event with r106.

If it does not have any effect, can you please try to call render() once and then remove the loading screen?

I’ve tried render before…It also made no difference…

Hi PD124,

we have the same problem: the glb model is loaded but the rendering is slow so we don’t know when remove the loading screen.

Have you solved the problem?