@galacean/engine-loader 1.0.0-beta.13 → 1.0.0-beta.15

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.
@@ -2410,8 +2410,14 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
2410
2410
  resourceManager.addContentRestorer(restorer);
2411
2411
  masterPromiseInfo.resolve(glTFResource);
2412
2412
  }).catch(function(e) {
2413
- console.error(e);
2414
- masterPromiseInfo.reject("Error loading glTF model from " + url + " .");
2413
+ var msg = "Error loading glTF model from " + url + " .";
2414
+ miniprogram.Logger.error(msg);
2415
+ masterPromiseInfo.reject(msg);
2416
+ context.defaultSceneRootPromiseInfo.reject(e);
2417
+ context.texturesPromiseInfo.reject(e);
2418
+ context.materialsPromiseInfo.reject(e);
2419
+ context.meshesPromiseInfo.reject(e);
2420
+ context.animationClipsPromiseInfo.reject(e);
2415
2421
  });
2416
2422
  return context.promiseMap;
2417
2423
  };
@@ -3963,7 +3969,7 @@ exports.MeshLoader = /*#__PURE__*/ function(Loader) {
3963
3969
  decode(data, resourceManager.engine).then(function(mesh) {
3964
3970
  resolve(mesh);
3965
3971
  });
3966
- });
3972
+ }).catch(reject);
3967
3973
  });
3968
3974
  };
3969
3975
  return MeshLoader;
@@ -3982,14 +3988,14 @@ exports.EditorTextureLoader = /*#__PURE__*/ function(Loader) {
3982
3988
  var _proto = EditorTextureLoader.prototype;
3983
3989
  _proto.load = function load(item, resourceManager) {
3984
3990
  var _this = this;
3985
- return new miniprogram.AssetPromise(function(resolve) {
3991
+ return new miniprogram.AssetPromise(function(resolve, reject) {
3986
3992
  _this.request(item.url, {
3987
3993
  type: "arraybuffer"
3988
3994
  }).then(function(data) {
3989
3995
  decode(data, resourceManager.engine).then(function(texture) {
3990
3996
  resolve(texture);
3991
3997
  });
3992
- });
3998
+ }).catch(reject);
3993
3999
  });
3994
4000
  };
3995
4001
  return EditorTextureLoader;
package/dist/module.js CHANGED
@@ -2405,8 +2405,14 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
2405
2405
  resourceManager.addContentRestorer(restorer);
2406
2406
  masterPromiseInfo.resolve(glTFResource);
2407
2407
  }).catch(function(e) {
2408
- console.error(e);
2409
- masterPromiseInfo.reject("Error loading glTF model from " + url + " .");
2408
+ var msg = "Error loading glTF model from " + url + " .";
2409
+ Logger.error(msg);
2410
+ masterPromiseInfo.reject(msg);
2411
+ context.defaultSceneRootPromiseInfo.reject(e);
2412
+ context.texturesPromiseInfo.reject(e);
2413
+ context.materialsPromiseInfo.reject(e);
2414
+ context.meshesPromiseInfo.reject(e);
2415
+ context.animationClipsPromiseInfo.reject(e);
2410
2416
  });
2411
2417
  return context.promiseMap;
2412
2418
  };
@@ -3958,7 +3964,7 @@ var MeshLoader$1 = /*#__PURE__*/ function(Loader) {
3958
3964
  decode(data, resourceManager.engine).then(function(mesh) {
3959
3965
  resolve(mesh);
3960
3966
  });
3961
- });
3967
+ }).catch(reject);
3962
3968
  });
3963
3969
  };
3964
3970
  return MeshLoader;
@@ -3977,14 +3983,14 @@ var EditorTextureLoader = /*#__PURE__*/ function(Loader) {
3977
3983
  var _proto = EditorTextureLoader.prototype;
3978
3984
  _proto.load = function load(item, resourceManager) {
3979
3985
  var _this = this;
3980
- return new AssetPromise(function(resolve) {
3986
+ return new AssetPromise(function(resolve, reject) {
3981
3987
  _this.request(item.url, {
3982
3988
  type: "arraybuffer"
3983
3989
  }).then(function(data) {
3984
3990
  decode(data, resourceManager.engine).then(function(texture) {
3985
3991
  resolve(texture);
3986
3992
  });
3987
- });
3993
+ }).catch(reject);
3988
3994
  });
3989
3995
  };
3990
3996
  return EditorTextureLoader;