How to track dependencies while using GLTFLoader

Description of the problem

Hi,

I’m using a pretty big glTF scene with the following files and sizes:

  • gltf file (around 700 KB)
  • bin file (geometry – around 10 MB)
  • texture files (around 120 separate jpg files, they’re around 5 MB together)
  • So everything together is around 16 MB

Now I’m trying to make a progress indicator, so the user can get an idea on how the loading goes. The problem is that the onProgress method of the GLTFLoader runs only for the gltf file itself, which is about 4-5 %% (700 KB / 16 MB) of the whole scene, so progress.loaded / progress.total already gives 100%%, when there is a bunch of other things left to load.

Is there a way to get a loaded / total value for the whole scene (including the bin file and the textures)?

Thank you

Author: Fantashit

1 thought on “How to track dependencies while using GLTFLoader

  1. If you pass a LoadingManager into the constructor for your GLTFLoader, you should be able to use its onProgress callbacks for other resources.

Comments are closed.