is there a way to read the download size or the file size from the Texture(Texture | Babylon.js Documentation) Class ? Or any other way?
I found a way to get it from meshes by using the onProgress callback from the sceneloader(SceneLoader | Babylon.js Documentation) and reading the event.total. Is there a better way to get this information?
Thanks in advance !
The meshes method is the expected way of doing that
Thanks, that works!
I assumed loading textures like this would cause higher loading time since i explicitly need to await the request.
However that doesn’t seem to be the case / the difference is small enough.
let res = await fetch(texture);
let buffer = await res.arrayBuffer();
let tex = Texture.LoadFromDataString(texture, buffer, scene);
let sizeMb = buffer.byteLength / 1000000;