@galacean/engine-loader 1.1.0-beta.12 → 1.1.0-beta.13
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 +9 -6
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +9 -6
- package/dist/module.js +9 -6
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
- package/types/GLTFLoader.d.ts +1 -0
- package/types/gltf/parser/GLTFParserContext.d.ts +3 -2
package/dist/main.js
CHANGED
|
@@ -1546,10 +1546,10 @@ var TextureWrapMode;
|
|
|
1546
1546
|
/**
|
|
1547
1547
|
* @internal
|
|
1548
1548
|
*/ var GLTFParserContext = /*#__PURE__*/ function() {
|
|
1549
|
-
function GLTFParserContext(glTFResource, resourceManager,
|
|
1549
|
+
function GLTFParserContext(glTFResource, resourceManager, params) {
|
|
1550
1550
|
this.glTFResource = glTFResource;
|
|
1551
1551
|
this.resourceManager = resourceManager;
|
|
1552
|
-
this.
|
|
1552
|
+
this.params = params;
|
|
1553
1553
|
this.accessorBufferCache = {};
|
|
1554
1554
|
this._resourceCache = new Map();
|
|
1555
1555
|
this.contentRestorer = new GLTFContentRestorer(glTFResource);
|
|
@@ -3884,7 +3884,7 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
|
|
|
3884
3884
|
return context.get(exports.GLTFParserType.Buffer).then(function(buffers) {
|
|
3885
3885
|
return GLTFUtils.getAccessorData(glTF, indexAccessor, buffers);
|
|
3886
3886
|
});
|
|
3887
|
-
}, context.keepMeshData).then(resolve);
|
|
3887
|
+
}, context.params.keepMeshData).then(resolve);
|
|
3888
3888
|
}
|
|
3889
3889
|
});
|
|
3890
3890
|
};
|
|
@@ -4065,6 +4065,7 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
4065
4065
|
var _this = this;
|
|
4066
4066
|
var _context_glTF = context.glTF, scenes = _context_glTF.scenes, _context_glTF_scene = _context_glTF.scene, scene = _context_glTF_scene === void 0 ? 0 : _context_glTF_scene, glTFResource = context.glTFResource;
|
|
4067
4067
|
var sceneInfo = scenes[index];
|
|
4068
|
+
var sceneExtensions = sceneInfo.extensions;
|
|
4068
4069
|
var engine = glTFResource.engine;
|
|
4069
4070
|
var isDefaultScene = scene === index;
|
|
4070
4071
|
var sceneNodes = sceneInfo.nodes;
|
|
@@ -4090,6 +4091,7 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
4090
4091
|
promises.push(this._parseEntityComponent(context, sceneNodes[i1]));
|
|
4091
4092
|
}
|
|
4092
4093
|
return Promise.all(promises).then(function() {
|
|
4094
|
+
GLTFParser.executeExtensionsAdditiveAndParse(sceneExtensions, context, sceneRoot, sceneInfo);
|
|
4093
4095
|
if (isDefaultScene) {
|
|
4094
4096
|
return Promise.all([
|
|
4095
4097
|
context.get(exports.GLTFParserType.Skin),
|
|
@@ -4466,11 +4468,12 @@ var GLTFLoader = /*#__PURE__*/ function(Loader1) {
|
|
|
4466
4468
|
}
|
|
4467
4469
|
var _proto = GLTFLoader.prototype;
|
|
4468
4470
|
_proto.load = function load(item, resourceManager) {
|
|
4469
|
-
var _params;
|
|
4470
4471
|
var url = item.url;
|
|
4471
4472
|
var params = item.params;
|
|
4472
4473
|
var glTFResource = new GLTFResource(resourceManager.engine, url);
|
|
4473
|
-
var context = new GLTFParserContext(glTFResource, resourceManager,
|
|
4474
|
+
var context = new GLTFParserContext(glTFResource, resourceManager, _extends({
|
|
4475
|
+
keepMeshData: false
|
|
4476
|
+
}, params));
|
|
4474
4477
|
return context.parse();
|
|
4475
4478
|
};
|
|
4476
4479
|
return GLTFLoader;
|
|
@@ -5682,7 +5685,7 @@ var KHR_draco_mesh_compression = (_KHR_draco_mesh_compression = /*#__PURE__*/ fu
|
|
|
5682
5685
|
throw "BlendShape animation is not supported when using draco.";
|
|
5683
5686
|
}, function() {
|
|
5684
5687
|
return decodedGeometry.index.array;
|
|
5685
|
-
}, context.keepMeshData);
|
|
5688
|
+
}, context.params.keepMeshData);
|
|
5686
5689
|
});
|
|
5687
5690
|
});
|
|
5688
5691
|
};
|