@galacean/engine-loader 1.1.0-alpha.2 → 1.1.0-alpha.3
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 +10 -8
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +10 -8
- package/dist/module.js +10 -8
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
package/dist/main.js
CHANGED
|
@@ -3607,16 +3607,16 @@ exports.GLTFBufferParser = __decorate([
|
|
|
3607
3607
|
registerGLTFParser(exports.GLTFParserType.Buffer)
|
|
3608
3608
|
], exports.GLTFBufferParser);
|
|
3609
3609
|
|
|
3610
|
-
exports.GLTFEntityParser = /*#__PURE__*/ function(
|
|
3611
|
-
_inherits(GLTFEntityParser,
|
|
3610
|
+
exports.GLTFEntityParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
3611
|
+
_inherits(GLTFEntityParser, GLTFParser1);
|
|
3612
3612
|
function GLTFEntityParser() {
|
|
3613
|
-
return
|
|
3613
|
+
return GLTFParser1.apply(this, arguments);
|
|
3614
3614
|
}
|
|
3615
3615
|
var _proto = GLTFEntityParser.prototype;
|
|
3616
3616
|
_proto.parse = function parse(context, index) {
|
|
3617
3617
|
var entityInfo = context.glTF.nodes[index];
|
|
3618
3618
|
var engine = context.glTFResource.engine;
|
|
3619
|
-
var matrix = entityInfo.matrix, translation = entityInfo.translation, rotation = entityInfo.rotation, scale = entityInfo.scale;
|
|
3619
|
+
var matrix = entityInfo.matrix, translation = entityInfo.translation, rotation = entityInfo.rotation, scale = entityInfo.scale, extensions = entityInfo.extensions;
|
|
3620
3620
|
var entity = new engineCore.Entity(engine, entityInfo.name || "_GLTF_ENTITY_" + index);
|
|
3621
3621
|
var transform = entity.transform;
|
|
3622
3622
|
if (matrix) {
|
|
@@ -3642,6 +3642,7 @@ exports.GLTFEntityParser = /*#__PURE__*/ function(GLTFParser) {
|
|
|
3642
3642
|
entity.addChild(childEntity);
|
|
3643
3643
|
}
|
|
3644
3644
|
}
|
|
3645
|
+
GLTFParser.executeExtensionsAdditiveAndParse(extensions, context, entity, entityInfo);
|
|
3645
3646
|
return entity;
|
|
3646
3647
|
};
|
|
3647
3648
|
return GLTFEntityParser;
|
|
@@ -4040,7 +4041,7 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
4040
4041
|
var _this = this;
|
|
4041
4042
|
var glTF = context.glTF, glTFResource = context.glTFResource;
|
|
4042
4043
|
var entityInfo = glTF.nodes[index];
|
|
4043
|
-
var cameraID = entityInfo.camera, meshID = entityInfo.mesh
|
|
4044
|
+
var cameraID = entityInfo.camera, meshID = entityInfo.mesh;
|
|
4044
4045
|
var entity = context.get(exports.GLTFParserType.Entity, index);
|
|
4045
4046
|
var promise;
|
|
4046
4047
|
if (cameraID !== undefined) {
|
|
@@ -4057,7 +4058,6 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
4057
4058
|
promises.push(_this._parseEntityComponent(context, children[i]));
|
|
4058
4059
|
}
|
|
4059
4060
|
}
|
|
4060
|
-
GLTFParser.executeExtensionsAdditiveAndParse(extensions, context, entity, entityInfo);
|
|
4061
4061
|
return Promise.all(promises);
|
|
4062
4062
|
});
|
|
4063
4063
|
};
|
|
@@ -5433,8 +5433,6 @@ var SceneLoader = /*#__PURE__*/ function(Loader) {
|
|
|
5433
5433
|
_this.request(item.url, {
|
|
5434
5434
|
type: "json"
|
|
5435
5435
|
}).then(function(data) {
|
|
5436
|
-
// @ts-ignore
|
|
5437
|
-
engine.resourceManager.initVirtualResources(data.files);
|
|
5438
5436
|
return SceneParser.parse(engine, data).then(function(scene) {
|
|
5439
5437
|
var promises = [];
|
|
5440
5438
|
// parse ambient light
|
|
@@ -5462,6 +5460,10 @@ var SceneLoader = /*#__PURE__*/ function(Loader) {
|
|
|
5462
5460
|
scene.ambientLight.diffuseSolidColor.copyFrom(ambient.diffuseSolidColor);
|
|
5463
5461
|
});
|
|
5464
5462
|
promises.push(ambientLightPromise);
|
|
5463
|
+
} else {
|
|
5464
|
+
scene.ambientLight.diffuseIntensity = ambient.diffuseIntensity;
|
|
5465
|
+
scene.ambientLight.specularIntensity = ambient.specularIntensity;
|
|
5466
|
+
scene.ambientLight.diffuseSolidColor.copyFrom(ambient.diffuseSolidColor);
|
|
5465
5467
|
}
|
|
5466
5468
|
var background = data.scene.background;
|
|
5467
5469
|
scene.background.mode = background.mode;
|