feat : ✨ resolve [TODO] - provide file size of imported mesh#219
feat : ✨ resolve [TODO] - provide file size of imported mesh#219slash9494 wants to merge 3 commits intobrianzinn:masterfrom
Conversation
|
hi @slash9494 It's definitely a pain when the file size isn't known and you want to show the progress. Are you downloading the entire file (await fetch ...) to get the file size? Can you perhaps share the calling code as it's not quite clear how this works - thanks! |
|
yes, what i tried to do was to get entire file size from local asset path I thought it was unusual to import large files from a local environment So,I tested with two files and another is from sketchfab
on storybook, i just change so, in and I figure out if |
|
Sorry @slash9494 I still do not follow. Are you not downloading the asset twice by fetching again in the callback? |
|
yes, you're right. the previous way was not good enough. so I fix a little bit more I change cache control of fetching for getting file data from disk memory I feel that this way would be better |
|
Ok - I’ll need to check how it runs after my vacation - May 16. I just need to see if on the first try it will load twice. Otherwise it would need to be an opt-in mechanism - also Babylon.js has built-in caching if you are continuously loading same mesh. |





Hi @brianzinn
while I use model's
onProgressor sceneLoader.Context's progress, I found an unresolved TODO feature that loads a correct file sizeSo, I resolve this in a simple way
let me show you the before and after video
before it was modified, GUI progress had not correct length and not the total length ( written as
10000) when importing asset filescreen-recording.3.mp4
and after modified, GUI progress run correctly
screen-recording.2.mp4
if there is any issue, please let know me