@galacean/engine-loader 1.3.28 → 1.3.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -463,18 +463,18 @@ exports.Texture2DDecoder = /*#__PURE__*/ function() {
463
463
  };
464
464
  _this._loadImageBuffer(imagesData[0]).then(function(img) {
465
465
  texture2D.setImageSource(img);
466
+ if (mipmap) {
467
+ var _loop = function(i) {
468
+ _this._loadImageBuffer(imagesData[i]).then(function(img) {
469
+ texture2D.setImageSource(img, i);
470
+ onComplete();
471
+ }, reject);
472
+ };
473
+ texture2D.generateMipmaps();
474
+ for(var i = 1; i < mipCount; i++)_loop(i);
475
+ }
466
476
  onComplete();
467
477
  }, reject);
468
- if (mipmap) {
469
- var _loop = function(i1) {
470
- _this._loadImageBuffer(imagesData[i1]).then(function(img) {
471
- texture2D.setImageSource(img, i1);
472
- onComplete();
473
- }, reject);
474
- };
475
- texture2D.generateMipmaps();
476
- for(var i1 = 1; i1 < mipCount; i1++)_loop(i1);
477
- }
478
478
  }
479
479
  });
480
480
  };
package/dist/module.js CHANGED
@@ -458,18 +458,18 @@ var Texture2DDecoder = /*#__PURE__*/ function() {
458
458
  };
459
459
  _this._loadImageBuffer(imagesData[0]).then(function(img) {
460
460
  texture2D.setImageSource(img);
461
+ if (mipmap) {
462
+ var _loop = function(i) {
463
+ _this._loadImageBuffer(imagesData[i]).then(function(img) {
464
+ texture2D.setImageSource(img, i);
465
+ onComplete();
466
+ }, reject);
467
+ };
468
+ texture2D.generateMipmaps();
469
+ for(var i = 1; i < mipCount; i++)_loop(i);
470
+ }
461
471
  onComplete();
462
472
  }, reject);
463
- if (mipmap) {
464
- var _loop = function(i1) {
465
- _this._loadImageBuffer(imagesData[i1]).then(function(img) {
466
- texture2D.setImageSource(img, i1);
467
- onComplete();
468
- }, reject);
469
- };
470
- texture2D.generateMipmaps();
471
- for(var i1 = 1; i1 < mipCount; i1++)_loop(i1);
472
- }
473
473
  }
474
474
  });
475
475
  };