@galacean/engine-loader 1.4.11 → 1.4.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
CHANGED
|
@@ -4266,17 +4266,14 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
4266
4266
|
GLTFMaterialParser._parseStandardProperty(context, material, materialInfo);
|
|
4267
4267
|
}
|
|
4268
4268
|
return Promise.resolve(material).then(function(material) {
|
|
4269
|
-
|
|
4269
|
+
// @ts-ignore
|
|
4270
|
+
material || (material = engine._basicResources._getBlinnPhongMaterial());
|
|
4270
4271
|
GLTFParser.executeExtensionsAdditiveAndParse(materialInfo.extensions, context, material, materialInfo);
|
|
4271
4272
|
// @ts-ignore
|
|
4272
4273
|
material._associationSuperResource(glTFResource);
|
|
4273
4274
|
return material;
|
|
4274
4275
|
});
|
|
4275
4276
|
};
|
|
4276
|
-
/** @internal */ GLTFMaterialParser._getDefaultMaterial = function _getDefaultMaterial(engine) {
|
|
4277
|
-
var _GLTFMaterialParser;
|
|
4278
|
-
return (_GLTFMaterialParser = GLTFMaterialParser)._defaultMaterial || (_GLTFMaterialParser._defaultMaterial = new engineCore.BlinnPhongMaterial(engine));
|
|
4279
|
-
};
|
|
4280
4277
|
/**
|
|
4281
4278
|
* @internal
|
|
4282
4279
|
*/ GLTFMaterialParser._checkOtherTextureTransform = function _checkOtherTextureTransform(texture, textureName) {
|
|
@@ -4690,7 +4687,7 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
4690
4687
|
Promise.all(materialPromises)
|
|
4691
4688
|
]).then(function(param) {
|
|
4692
4689
|
var _loop = function(i) {
|
|
4693
|
-
var material = materials[i] ||
|
|
4690
|
+
var material = materials[i] || basicResources._getBlinnPhongMaterial();
|
|
4694
4691
|
var glTFPrimitive = glTFMeshPrimitives[i];
|
|
4695
4692
|
var mesh = meshes[i];
|
|
4696
4693
|
var renderer = void 0;
|
|
@@ -4719,6 +4716,8 @@ exports.GLTFSceneParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
4719
4716
|
GLTFParser.executeExtensionsAdditiveAndParse(glTFPrimitive.extensions, context, renderer, glTFPrimitive);
|
|
4720
4717
|
};
|
|
4721
4718
|
var meshes = param[0], skin = param[1], materials = param[2];
|
|
4719
|
+
// @ts-ignore
|
|
4720
|
+
var basicResources = context.glTFResource.engine._basicResources;
|
|
4722
4721
|
for(var i = 0; i < rendererCount; i++)_loop(i);
|
|
4723
4722
|
});
|
|
4724
4723
|
};
|