Dear all
Maybe this is a dummy question, but I couldn't figure out a workaround solution. I have created a scene using the standard var createScene = function() {}, after which I make MULTIPLE calls to import meshes BABYLON.SceneLoader.ImportMesh().
I try to display the Preloading screen using the following code
var renderFunction = function ()
{
if (scene) {
var remaining = scene.getWaitingItemsCount();
if (remaining !=0)
{
engine.displayLoadingUI();
engine.loadingUIBackgroundColor = "green";
engine.loadingUIText = "Please Wait, An Incredible 3D Online Shopping Experience is Streaming: " + (remaining ? (remaining + " items remaining") : "");
}
else if (remaining ==0)
{
engine.hideLoadingUI();
}
scene.render();
}
};
engine.runRenderLoop(renderFunction);
The problme is that scene.getWaitingItemsCount() fluctuates, it decreases than increases, then decreases until it gets to zero. Is there a way for Counting to wait for ALL meshes/textures to QUEUE before it fires?