src/scene.js
function(numberOfDownloaded, finishCallback, allCompletedCallback) {
    let downloadedItem = 0;
    return zincGeometry => {
      downloadedItem = downloadedItem + 1;
      if (finishCallback != undefined && (typeof finishCallback == 'function'))
        finishCallback(zincGeometry);
      if (downloadedItem == numberOfDownloaded)
        if (allCompletedCallback != undefined && (typeof allCompletedCallback == 'function'))
          allCompletedCallback();
    };
  }
function(numberOfDownloaded, finishCallback, allCompletedCallback) {
    let downloadedItem = 0;
    return zincGeometry => {
      downloadedItem = downloadedItem + 1;
      if (finishCallback != undefined && (typeof finishCallback == 'function'))
        finishCallback(zincGeometry);
      if (downloadedItem == numberOfDownloaded)
        if (allCompletedCallback != undefined && (typeof allCompletedCallback == 'function'))
          allCompletedCallback();
    };
  }
function ( numberOfDownloaded , finishCallback , allCompletedCallback ) { let downloadedItem = 0 ; return zincGeometry => { downloadedItem = downloadedItem + 1 ; if ( finishCallback != undefined && ( typeof finishCallback == 'function' ) ) finishCallback ( zincGeometry ) ; if ( downloadedItem == numberOfDownloaded ) if ( allCompletedCallback != undefined && ( typeof allCompletedCallback == 'function' ) ) allCompletedCallback ( ) ; } ; }
Object to keep track of number of items downloaded and when add items are downloaded allCompletedCallback is called
Object to keep track of number of items downloaded and when add items are downloaded allCompletedCallback is called