GLTFLoader onProgress total is always 0

When I load a model using the GLTFLoader, when I try to calculate the progress %% in the onProgress function, the “total” value of the ProgressEvent is always 0. I tried with different models and I always get the same result.

Here my onProgress function:
function (xhr) { console.log((xhr.loaded / * 100) + '%% loaded'); } is always 0 so the result is always “Infinity%% loaded”. I saw the same thing on many examples online.
Attached you can also find a screen of the ProgressEvent debugged.
schermata 2019-01-15 alle 10 03 48

Three.js version
  • Dev
  • r100
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Author: Fantashit

1 thought on “GLTFLoader onProgress total is always 0

Comments are closed.