src/asset-loader.js
/**
   * Load a set of assets in parallel
   * @param  {Array} urls   Array of urls of resources
   * @param  {Array} types  Array of types of resources
   * @return {Promise}      A Promise that resolves when all assets are loaded,
   *                        or rejects when any fail.
   * @see  AssetLoader.loadResource
   */
Load a set of assets in parallel
@param  {Array} urls   Array of urls of resources
@param  {Array} types  Array of types of resources
@return {Promise}      A Promise that resolves when all assets are loaded,
or rejects when any fail.
Load a set of assets in parallel @param { Array } urls Array of urls of resources @param { Array } types Array of types of resources @return { Promise } A Promise that resolves when all assets are loaded or rejects when any fail .
loadAssetGroup(urls, types) {
    if(urls.length !== types.length)
    {
      throw 'Incompatible types: types.length = ' + types.length + '; urls.length = ' + urls.length;
    }
    return Promise.all(
      urls.map((url, i) => {
        return this.loadAsset(url, types[i]);
      })
    );
  }
loadAssetGroup ( urls , types ) { if ( urls . length !== types . length ) { throw 'Incompatible types: types.length = ' + types . length + '; urls.length = ' + urls . length ; } return Promise . all ( urls . map ( ( url , i ) => { return this . loadAsset ( url , types [ i ] ) ; } ) ) ; }
Load a set of assets in parallel
 @param  {Array} urls   Array of urls of resources
 @param  {Array} types  Array of types of resources
 @return {Promise}      A Promise that resolves when all assets are loaded,
                        or rejects when any fail.
Load a set of assets in parallel @param { Array } urls Array of urls of resources @param { Array } types Array of types of resources @return { Promise } A Promise that resolves when all assets are loaded or rejects when any fail .