@galacean/engine-loader 0.9.19 → 0.9.20
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.
- package/dist/main.js +11 -5
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +11 -5
- package/dist/module.js +11 -5
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
- package/types/GLTFContentRestorer.d.ts +17 -7
- package/types/gltf/GLTFUtils.d.ts +2 -1
- package/types/gltf/parser/GLTFAnimationParser.d.ts +2 -2
- package/types/gltf/parser/GLTFMeshParser.d.ts +5 -5
- package/types/gltf/parser/GLTFParserContext.d.ts +6 -1
- package/types/gltf/parser/GLTFSceneParser.d.ts +2 -2
- package/types/gltf/parser/GLTFSkinParser.d.ts +2 -1
- package/types/gltf/parser/GLTFTextureParser.d.ts +3 -2
package/dist/main.js
CHANGED
|
@@ -2523,8 +2523,14 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
|
2523
2523
|
}
|
|
2524
2524
|
});
|
|
2525
2525
|
GLTFParser.defaultPipeline.parse(context).then(masterPromiseInfo.resolve).catch(function(e) {
|
|
2526
|
-
|
|
2527
|
-
|
|
2526
|
+
var msg = "Error loading glTF model from " + url + " .";
|
|
2527
|
+
engineCore.Logger.error(msg);
|
|
2528
|
+
masterPromiseInfo.reject(msg);
|
|
2529
|
+
context.defaultSceneRootPromiseInfo.reject(e);
|
|
2530
|
+
context.texturesPromiseInfo.reject(e);
|
|
2531
|
+
context.materialsPromiseInfo.reject(e);
|
|
2532
|
+
context.meshesPromiseInfo.reject(e);
|
|
2533
|
+
context.animationClipsPromiseInfo.reject(e);
|
|
2528
2534
|
});
|
|
2529
2535
|
return context.promiseMap;
|
|
2530
2536
|
};
|
|
@@ -4082,7 +4088,7 @@ exports.MeshLoader = /*#__PURE__*/ function(Loader) {
|
|
|
4082
4088
|
decode(data, resourceManager.engine).then(function(mesh) {
|
|
4083
4089
|
resolve(mesh);
|
|
4084
4090
|
});
|
|
4085
|
-
});
|
|
4091
|
+
}).catch(reject);
|
|
4086
4092
|
});
|
|
4087
4093
|
};
|
|
4088
4094
|
return MeshLoader;
|
|
@@ -4101,14 +4107,14 @@ exports.EditorTextureLoader = /*#__PURE__*/ function(Loader) {
|
|
|
4101
4107
|
var _proto = EditorTextureLoader.prototype;
|
|
4102
4108
|
_proto.load = function load(item, resourceManager) {
|
|
4103
4109
|
var _this = this;
|
|
4104
|
-
return new engineCore.AssetPromise(function(resolve) {
|
|
4110
|
+
return new engineCore.AssetPromise(function(resolve, reject) {
|
|
4105
4111
|
_this.request(item.url, {
|
|
4106
4112
|
type: "arraybuffer"
|
|
4107
4113
|
}).then(function(data) {
|
|
4108
4114
|
decode(data, resourceManager.engine).then(function(texture) {
|
|
4109
4115
|
resolve(texture);
|
|
4110
4116
|
});
|
|
4111
|
-
});
|
|
4117
|
+
}).catch(reject);
|
|
4112
4118
|
});
|
|
4113
4119
|
};
|
|
4114
4120
|
return EditorTextureLoader;
|