I’m trying to combine two loading flows into one progress bar:
Main scene loading (via progress) → 0% to 60%
Child scene loading (via progress from sceneswitcher) → 60% to 100%.
The problem is:
After the main scene finishes loading, the scene loading progress callback doesn’t fire immediately.
There’s a delay of a few seconds (especially when the main scene has a lot of objects), so the loading bar looks like it’s stuck at 60%. Then all progress events fire at once and the bar jumps rapidly to 100%.
I was able to reproduce this even using the sample scene.
The progress callbacks are directly passed through from the three.js GLTFLoader that is used under the hood. Is it possible that your UI is stuck due to the scene loading and many heavy objects being created? Needle Engine is not modifying the loading progress status.
Which sample scene did you use? Did you modify the scene in any way?
Hey, thanks for the reply.
This is the multi-scene example with a React base. To reproduce the issue, I had to duplicate the same elements multiple times to make the parent scene (where the SceneSwitcher lives) heavy.
The issue only reproduces when the parent scene has a significant amount of data / GameObjects.
as said before, we call load on the GLTFLoader and pass the progress event through - the callback you get is the raw information we get from three.js.
It looks like the progress is stuck because your root scene is heavy and it takes a few seconds to build all the geometry, materials and objects. You can mitigate this by reducing the complexity of your root scene
You can see it here in the waterfall screenshot. The Multi Scenes.glb has finished loading and the time between the the end of the loading scene and the start is where the progress is at 0.6 - it is constructing the 3D scene here.
The SceneSwitcher progress event is called immediately when the loading progress starts (depending on download speed this is very fast because the sub-scene that you’re loading is not very large, just 1 MB vs 10 MB of the root scene in the bugreport)
If reducing the scene complexity is not an option have you tried to simulate loading progress by just slowly increasing from 0.6 to 1.0 while the GLTFLoader is building the scene so it doesnt appear static to the user?