Jump to content

Loading progress for import mesh while AssetsManager is used.


arek3D
 Share

Recommended Posts

Hello, 

I have a problem with get information how many percent of all mesh/textures were loaded, while I use AssetsManager.
I have seen a similar topic, but there SceneLoader is used.
Is it possible to get those information about loading progress, while I use AssetsManager?

Link to comment
Share on other sites

Hi arek3d, welcome to the forum.  Let's ping mister @Temechon and see if he'll offer advice.  :)

https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.assetsManager.ts#L314

I see no mention in here... about "progress", so, I don't think the DefaultLoadingScreen has a progress feature available.  But I'm no expert.

You COULD build your own loading screen, and tell users how many assetsManager tasks still remain unfinished (by counting-down a global number... with each task.onSuccess() callback.)

Each task's onSuccess function... updates the "count-down" on your custom loading screen.  *shrug*.  It's not byte-based progress.  It's "How many assetsManager tasks still remain".  :)

Just an idea.  Likely not a very good one.  Hopefully, others will comment.

Link to comment
Share on other sites

I was thinking about that solution before, but I have one big file and only few small textures, so it wouldn't look rightly I think. So I see two ways:
1) make fake loading progress using setInterval() and variable with logarithmic increase.
2) Change AssetManager to SceneLoader.

Thank you very much @Wingnut and @Deltakosh!

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