arek3D Posted January 12, 2017 Share Posted January 12, 2017 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? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 13, 2017 Share Posted January 13, 2017 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. arek3D 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 13, 2017 Share Posted January 13, 2017 Hello I like Wingnut's idea. It is the simplest thing to do. For byte-based progress, it is tough because depending on the server, you not always have the information about total bytes to load. arek3D 1 Quote Link to comment Share on other sites More sharing options...
arek3D Posted January 18, 2017 Author Share Posted January 18, 2017 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! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted January 19, 2017 Share Posted January 19, 2017 xhr request 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.