Xav Posted May 31, 2016 Share Posted May 31, 2016 Hello, I want to add percentage of loading assets below the default babylon screen loader with the single text "Loading assets x %..." using loading screen. x=(number of loading asstes / 100)*total assets. I have found informations in http://doc.babylonjs.com/tutorials/How_to_use_AssetsManager#using-loading-screen and http://www.babylonjs-playground.com/#1WXS3J But my question is how to get number of loading asstes in my scene and total assets is the number of mesh and textures in my babylon file? Finally where i have to put this function ? Thanks Quote Link to comment Share on other sites More sharing options...
Xav Posted May 31, 2016 Author Share Posted May 31, 2016 It's ok I use this function : function (evt) {if (evt.lengthComputable) { engine.loadingUIText = "Loading, please wait..." + (evt.loaded * 100 / evt.total).toFixed() + "%";} else {dlCount = evt.loaded / (1024 * 1024);engine.loadingUIText = "Loading, please wait..." + Math.floor(dlCount * 100.0) / 100.0 + " MB already loaded.";}}); in function2 BABYLON.SceneLoader.Load(Scenename, name.babylon, engine, function1, function2); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 31, 2016 Share Posted May 31, 2016 Correct, this is the progresseCallback: https://github.com/BabylonJS/Babylon.js/blob/master/src/Loading/babylon.sceneLoader.ts#L194 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.