Skip to content

GLTFLoader onProgress total is always 0 #15584

@santacrab

Description

@santacrab

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 / xhr.total * 100) + '% loaded'); }

xhr.total 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
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions