Jump to content

percentage loading assets


Xav
 Share

Recommended Posts

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 ;)

Link to comment
Share on other sites

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);
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...