@galacean/engine-loader 1.5.5 → 1.5.7
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 -2
- package/dist/main.js.map +1 -1
- package/dist/module.js +10 -2
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/main.js
CHANGED
|
@@ -4538,6 +4538,8 @@ exports.GLTFEntityParser = __decorate([
|
|
|
4538
4538
|
registerGLTFParser(GLTFParserType.Entity)
|
|
4539
4539
|
], exports.GLTFEntityParser);
|
|
4540
4540
|
|
|
4541
|
+
// @todo: remap plugin should have a higher priority storage location
|
|
4542
|
+
var REMAP_NAME = "GALACEAN_materials_remap";
|
|
4541
4543
|
exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
4542
4544
|
_inherits(GLTFMaterialParser, GLTFParser1);
|
|
4543
4545
|
function GLTFMaterialParser() {
|
|
@@ -4548,7 +4550,13 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
4548
4550
|
var materialInfo = context.glTF.materials[index];
|
|
4549
4551
|
var glTFResource = context.glTFResource;
|
|
4550
4552
|
var engine = glTFResource.engine;
|
|
4551
|
-
var
|
|
4553
|
+
var extensions = materialInfo.extensions || {};
|
|
4554
|
+
//Keep only the remap extension
|
|
4555
|
+
if (extensions[REMAP_NAME]) {
|
|
4556
|
+
var _obj;
|
|
4557
|
+
extensions = (_obj = {}, _obj[REMAP_NAME] = extensions[REMAP_NAME], _obj);
|
|
4558
|
+
}
|
|
4559
|
+
var material = GLTFParser.executeExtensionsCreateAndParse(extensions, context, materialInfo);
|
|
4552
4560
|
if (!material) {
|
|
4553
4561
|
material = new engineCore.PBRMaterial(engine);
|
|
4554
4562
|
material.name = materialInfo.name;
|
|
@@ -4557,7 +4565,7 @@ exports.GLTFMaterialParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
4557
4565
|
return engineCore.AssetPromise.resolve(material).then(function(material) {
|
|
4558
4566
|
// @ts-ignore
|
|
4559
4567
|
material || (material = engine._basicResources._getBlinnPhongMaterial());
|
|
4560
|
-
GLTFParser.executeExtensionsAdditiveAndParse(
|
|
4568
|
+
GLTFParser.executeExtensionsAdditiveAndParse(extensions, context, material, materialInfo);
|
|
4561
4569
|
// @ts-ignore
|
|
4562
4570
|
material._associationSuperResource(glTFResource);
|
|
4563
4571
|
return material;
|