@pranastons (Pranastons) posted a new topic, subject "LoadingManager wrong itemsTotal". It read:

   Hey!
    
    There is a problem!
    
    When I load even one gltf file (no textures, etc.) LoadingManager onProgress shows wrong itemsTotal. in fact, if there is only one gltf file, then itemsTotal = 2
    
    http://joxi.ru/Y2L5ODvHMvz38A

After which, @Mugen87 (Michael Herzog) added

    What you see is the effect of a workaround in `GLTFLoader` to ensure `LoadingManager.onLoad()` is fired correctly.
    
    github.com
    
    #### mrdoob/three.js/blob/dd6ab3cf310f78a8375b8b2037db12ce8e31e82c/examples/jsm/loaders/GLTFLoader.js#L136-L139
    [code] 
            
              
        
        
                  
          136. 		// Tells the LoadingManager to track an extra item, which resolves after
        
                  
          137. 		// the model is fully loaded. This means the count of items loaded will
        
                  
          138. 		// be incorrect, but ensures manager.onLoad() does not fire early.
        
                  
          139. 		this.manager.itemStart( url );
        
              
        
            
          
    [/code]

@pranastons (Pranastons) replied

    Oh! thank you very much!


{'source': 'discourse', 'url': 'https://discourse.threejs.org/t/loadingmanager-wrong-itemstotal/27629', 'title': 'LoadingManager wrong itemsTotal', 'views': 141, 'has_accepted_answer': True, 'word_count': 78, 'like_count': 0, 'reply_count': 1, 'participant_count': 2, 'posts': 3, 'tags': 'gltf-loader', 'author': '@pranastons (Pranastons)', 'participants': '@pranastons (Pranastons), @Mugen87 (Michael Herzog)', 'image_url': [None], 'created_at': '2021-06-29T09:57:34.563Z', 'last_posted_at': '2021-06-30T01:09:58.083Z'}