@galacean/engine-loader 1.3.1 → 1.3.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 +87 -49
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +87 -49
- package/dist/module.js +87 -49
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/gltf/GLTFSchema.d.ts +1 -1
- package/types/gltf/extensions/EXT_texture_webp.d.ts +1 -0
- package/types/gltf/extensions/index.d.ts +1 -0
- package/types/gltf/parser/GLTFTextureParser.d.ts +4 -2
package/dist/miniprogram.js
CHANGED
|
@@ -4750,57 +4750,18 @@ exports.GLTFSkinParser = __decorate([
|
|
|
4750
4750
|
|
|
4751
4751
|
var _GLTFTextureParser;
|
|
4752
4752
|
exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
4753
|
-
_inherits(
|
|
4754
|
-
function
|
|
4753
|
+
_inherits(GLTFTextureParser1, GLTFParser1);
|
|
4754
|
+
function GLTFTextureParser1() {
|
|
4755
4755
|
return GLTFParser1.apply(this, arguments);
|
|
4756
4756
|
}
|
|
4757
|
-
var _proto =
|
|
4758
|
-
_proto.parse = function parse(context,
|
|
4759
|
-
var textureInfo = context.glTF.textures[
|
|
4760
|
-
var glTFResource = context.glTFResource
|
|
4761
|
-
var
|
|
4762
|
-
var
|
|
4763
|
-
var _glTF_images_source = glTF.images[source], uri = _glTF_images_source.uri, bufferViewIndex = _glTF_images_source.bufferView, mimeType = _glTF_images_source.mimeType, imageName = _glTF_images_source.name;
|
|
4764
|
-
var texture = GLTFParser.executeExtensionsCreateAndParse(extensions, context, textureInfo);
|
|
4757
|
+
var _proto = GLTFTextureParser1.prototype;
|
|
4758
|
+
_proto.parse = function parse(context, textureIndex) {
|
|
4759
|
+
var textureInfo = context.glTF.textures[textureIndex];
|
|
4760
|
+
var glTFResource = context.glTFResource;
|
|
4761
|
+
var sampler = textureInfo.sampler, tmp = textureInfo.source, imageIndex = tmp === void 0 ? 0 : tmp, textureName = textureInfo.name, extensions = textureInfo.extensions;
|
|
4762
|
+
var texture = GLTFParser.executeExtensionsCreateAndParse(extensions, context, textureInfo, textureIndex);
|
|
4765
4763
|
if (!texture) {
|
|
4766
|
-
|
|
4767
|
-
var samplerInfo = sampler !== undefined && GLTFUtils.getSamplerInfo(glTF.samplers[sampler]);
|
|
4768
|
-
if (uri) {
|
|
4769
|
-
var _samplerInfo;
|
|
4770
|
-
// TODO: deleted in 2.0
|
|
4771
|
-
var extIndex = uri.lastIndexOf(".");
|
|
4772
|
-
var ext = uri.substring(extIndex + 1);
|
|
4773
|
-
var type = ext.startsWith("ktx") ? miniprogram.AssetType.KTX : miniprogram.AssetType.Texture2D;
|
|
4774
|
-
texture = engine.resourceManager.load({
|
|
4775
|
-
url: miniprogram.Utils.resolveAbsoluteUrl(url, uri),
|
|
4776
|
-
type: type,
|
|
4777
|
-
params: {
|
|
4778
|
-
mipmap: (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap
|
|
4779
|
-
}
|
|
4780
|
-
}).onProgress(undefined, context._onTaskDetail).then(function(texture) {
|
|
4781
|
-
texture.name = textureName || imageName || texture.name || "texture_" + index;
|
|
4782
|
-
useSampler && GLTFUtils.parseSampler(texture, samplerInfo);
|
|
4783
|
-
return texture;
|
|
4784
|
-
});
|
|
4785
|
-
context._addTaskCompletePromise(texture);
|
|
4786
|
-
} else {
|
|
4787
|
-
var bufferView = glTF.bufferViews[bufferViewIndex];
|
|
4788
|
-
texture = context.get(exports.GLTFParserType.Buffer).then(function(buffers) {
|
|
4789
|
-
var buffer = buffers[bufferView.buffer];
|
|
4790
|
-
var imageBuffer = new Uint8Array(buffer, bufferView.byteOffset, bufferView.byteLength);
|
|
4791
|
-
return GLTFUtils.loadImageBuffer(imageBuffer, mimeType).then(function(image) {
|
|
4792
|
-
var _samplerInfo;
|
|
4793
|
-
var texture = new miniprogram.Texture2D(engine, image.width, image.height, undefined, (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap);
|
|
4794
|
-
texture.setImageSource(image);
|
|
4795
|
-
texture.generateMipmaps();
|
|
4796
|
-
texture.name = textureName || imageName || "texture_" + index;
|
|
4797
|
-
useSampler && GLTFUtils.parseSampler(texture, samplerInfo);
|
|
4798
|
-
var bufferTextureRestoreInfo = new BufferTextureRestoreInfo(texture, bufferView, mimeType);
|
|
4799
|
-
context.contentRestorer.bufferTextures.push(bufferTextureRestoreInfo);
|
|
4800
|
-
return texture;
|
|
4801
|
-
});
|
|
4802
|
-
});
|
|
4803
|
-
}
|
|
4764
|
+
texture = exports.GLTFTextureParser._parseTexture(context, imageIndex, textureIndex, sampler, textureName);
|
|
4804
4765
|
}
|
|
4805
4766
|
return Promise.resolve(texture).then(function(texture) {
|
|
4806
4767
|
GLTFParser.executeExtensionsAdditiveAndParse(extensions, context, texture, textureInfo);
|
|
@@ -4809,7 +4770,51 @@ exports.GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFPar
|
|
|
4809
4770
|
return texture;
|
|
4810
4771
|
});
|
|
4811
4772
|
};
|
|
4812
|
-
|
|
4773
|
+
/** @internal */ GLTFTextureParser1._parseTexture = function _parseTexture(context, imageIndex, textureIndex, sampler, textureName) {
|
|
4774
|
+
var glTFResource = context.glTFResource, glTF = context.glTF;
|
|
4775
|
+
var engine = glTFResource.engine, url = glTFResource.url;
|
|
4776
|
+
var _glTF_images_imageIndex = glTF.images[imageIndex], uri = _glTF_images_imageIndex.uri, bufferViewIndex = _glTF_images_imageIndex.bufferView, mimeType = _glTF_images_imageIndex.mimeType, imageName = _glTF_images_imageIndex.name;
|
|
4777
|
+
var useSampler = sampler !== undefined;
|
|
4778
|
+
var samplerInfo = useSampler && GLTFUtils.getSamplerInfo(glTF.samplers[sampler]);
|
|
4779
|
+
var texture;
|
|
4780
|
+
if (uri) {
|
|
4781
|
+
var _samplerInfo;
|
|
4782
|
+
var extIndex = uri.lastIndexOf(".");
|
|
4783
|
+
var ext = uri.substring(extIndex + 1);
|
|
4784
|
+
var type = ext.startsWith("ktx") ? miniprogram.AssetType.KTX : miniprogram.AssetType.Texture2D;
|
|
4785
|
+
texture = engine.resourceManager.load({
|
|
4786
|
+
url: miniprogram.Utils.resolveAbsoluteUrl(url, uri),
|
|
4787
|
+
type: type,
|
|
4788
|
+
params: {
|
|
4789
|
+
mipmap: (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap
|
|
4790
|
+
}
|
|
4791
|
+
}).onProgress(undefined, context._onTaskDetail).then(function(texture) {
|
|
4792
|
+
texture.name = textureName || imageName || texture.name || "texture_" + textureIndex;
|
|
4793
|
+
useSampler && GLTFUtils.parseSampler(texture, samplerInfo);
|
|
4794
|
+
return texture;
|
|
4795
|
+
});
|
|
4796
|
+
context._addTaskCompletePromise(texture);
|
|
4797
|
+
} else {
|
|
4798
|
+
var bufferView = glTF.bufferViews[bufferViewIndex];
|
|
4799
|
+
texture = context.get(exports.GLTFParserType.Buffer).then(function(buffers) {
|
|
4800
|
+
var buffer = buffers[bufferView.buffer];
|
|
4801
|
+
var imageBuffer = new Uint8Array(buffer, bufferView.byteOffset, bufferView.byteLength);
|
|
4802
|
+
return GLTFUtils.loadImageBuffer(imageBuffer, mimeType).then(function(image) {
|
|
4803
|
+
var _samplerInfo;
|
|
4804
|
+
var texture = new miniprogram.Texture2D(engine, image.width, image.height, undefined, (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap);
|
|
4805
|
+
texture.setImageSource(image);
|
|
4806
|
+
texture.generateMipmaps();
|
|
4807
|
+
texture.name = textureName || imageName || "texture_" + textureIndex;
|
|
4808
|
+
useSampler && GLTFUtils.parseSampler(texture, samplerInfo);
|
|
4809
|
+
var bufferTextureRestoreInfo = new BufferTextureRestoreInfo(texture, bufferView, mimeType);
|
|
4810
|
+
context.contentRestorer.bufferTextures.push(bufferTextureRestoreInfo);
|
|
4811
|
+
return texture;
|
|
4812
|
+
});
|
|
4813
|
+
});
|
|
4814
|
+
}
|
|
4815
|
+
return texture;
|
|
4816
|
+
};
|
|
4817
|
+
return GLTFTextureParser1;
|
|
4813
4818
|
}(GLTFParser), function() {
|
|
4814
4819
|
var _obj;
|
|
4815
4820
|
/** @internal */ _GLTFTextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = miniprogram.TextureWrapMode.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = miniprogram.TextureWrapMode.Mirror, _obj[TextureWrapMode.REPEAT] = miniprogram.TextureWrapMode.Repeat, _obj);
|
|
@@ -6874,6 +6879,39 @@ KHR_materials_anisotropy = __decorate([
|
|
|
6874
6879
|
registerGLTFExtension("KHR_materials_anisotropy", exports.GLTFExtensionMode.AdditiveParse)
|
|
6875
6880
|
], KHR_materials_anisotropy);
|
|
6876
6881
|
|
|
6882
|
+
var EXT_texture_webp = /*#__PURE__*/ function(GLTFExtensionParser1) {
|
|
6883
|
+
_inherits(EXT_texture_webp, GLTFExtensionParser1);
|
|
6884
|
+
function EXT_texture_webp() {
|
|
6885
|
+
var _this;
|
|
6886
|
+
_this = GLTFExtensionParser1.call(this) || this;
|
|
6887
|
+
_this._supportWebP = false;
|
|
6888
|
+
var testCanvas = engineMiniprogramAdapter.document.createElement("canvas");
|
|
6889
|
+
testCanvas.width = testCanvas.height = 1;
|
|
6890
|
+
_this._supportWebP = testCanvas.toDataURL("image/webp").indexOf("data:image/webp") == 0;
|
|
6891
|
+
return _this;
|
|
6892
|
+
}
|
|
6893
|
+
var _proto = EXT_texture_webp.prototype;
|
|
6894
|
+
_proto.createAndParse = function createAndParse(context, schema, textureInfo, textureIndex) {
|
|
6895
|
+
var _this = this;
|
|
6896
|
+
return _async_to_generator(function() {
|
|
6897
|
+
var webPIndex, sampler, tmp, fallbackIndex, textureName, texture;
|
|
6898
|
+
return __generator(this, function(_state) {
|
|
6899
|
+
webPIndex = schema.source;
|
|
6900
|
+
sampler = textureInfo.sampler, tmp = textureInfo.source, fallbackIndex = tmp === void 0 ? 0 : tmp, textureName = textureInfo.name;
|
|
6901
|
+
texture = exports.GLTFTextureParser._parseTexture(context, _this._supportWebP ? webPIndex : fallbackIndex, textureIndex, sampler, textureName);
|
|
6902
|
+
return [
|
|
6903
|
+
2,
|
|
6904
|
+
texture
|
|
6905
|
+
];
|
|
6906
|
+
});
|
|
6907
|
+
})();
|
|
6908
|
+
};
|
|
6909
|
+
return EXT_texture_webp;
|
|
6910
|
+
}(GLTFExtensionParser);
|
|
6911
|
+
EXT_texture_webp = __decorate([
|
|
6912
|
+
registerGLTFExtension("EXT_texture_webp", exports.GLTFExtensionMode.CreateAndParse)
|
|
6913
|
+
], EXT_texture_webp);
|
|
6914
|
+
|
|
6877
6915
|
exports.BufferInfo = BufferInfo;
|
|
6878
6916
|
exports.BufferReader = BufferReader;
|
|
6879
6917
|
exports.FileHeader = FileHeader;
|
package/dist/module.js
CHANGED
|
@@ -4745,57 +4745,18 @@ GLTFSkinParser = __decorate([
|
|
|
4745
4745
|
|
|
4746
4746
|
var _GLTFTextureParser;
|
|
4747
4747
|
var GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
4748
|
-
_inherits(
|
|
4749
|
-
function
|
|
4748
|
+
_inherits(GLTFTextureParser1, GLTFParser1);
|
|
4749
|
+
function GLTFTextureParser1() {
|
|
4750
4750
|
return GLTFParser1.apply(this, arguments);
|
|
4751
4751
|
}
|
|
4752
|
-
var _proto =
|
|
4753
|
-
_proto.parse = function parse(context,
|
|
4754
|
-
var textureInfo = context.glTF.textures[
|
|
4755
|
-
var glTFResource = context.glTFResource
|
|
4756
|
-
var
|
|
4757
|
-
var
|
|
4758
|
-
var _glTF_images_source = glTF.images[source], uri = _glTF_images_source.uri, bufferViewIndex = _glTF_images_source.bufferView, mimeType = _glTF_images_source.mimeType, imageName = _glTF_images_source.name;
|
|
4759
|
-
var texture = GLTFParser.executeExtensionsCreateAndParse(extensions, context, textureInfo);
|
|
4752
|
+
var _proto = GLTFTextureParser1.prototype;
|
|
4753
|
+
_proto.parse = function parse(context, textureIndex) {
|
|
4754
|
+
var textureInfo = context.glTF.textures[textureIndex];
|
|
4755
|
+
var glTFResource = context.glTFResource;
|
|
4756
|
+
var sampler = textureInfo.sampler, tmp = textureInfo.source, imageIndex = tmp === void 0 ? 0 : tmp, textureName = textureInfo.name, extensions = textureInfo.extensions;
|
|
4757
|
+
var texture = GLTFParser.executeExtensionsCreateAndParse(extensions, context, textureInfo, textureIndex);
|
|
4760
4758
|
if (!texture) {
|
|
4761
|
-
|
|
4762
|
-
var samplerInfo = sampler !== undefined && GLTFUtils.getSamplerInfo(glTF.samplers[sampler]);
|
|
4763
|
-
if (uri) {
|
|
4764
|
-
var _samplerInfo;
|
|
4765
|
-
// TODO: deleted in 2.0
|
|
4766
|
-
var extIndex = uri.lastIndexOf(".");
|
|
4767
|
-
var ext = uri.substring(extIndex + 1);
|
|
4768
|
-
var type = ext.startsWith("ktx") ? AssetType.KTX : AssetType.Texture2D;
|
|
4769
|
-
texture = engine.resourceManager.load({
|
|
4770
|
-
url: Utils.resolveAbsoluteUrl(url, uri),
|
|
4771
|
-
type: type,
|
|
4772
|
-
params: {
|
|
4773
|
-
mipmap: (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap
|
|
4774
|
-
}
|
|
4775
|
-
}).onProgress(undefined, context._onTaskDetail).then(function(texture) {
|
|
4776
|
-
texture.name = textureName || imageName || texture.name || "texture_" + index;
|
|
4777
|
-
useSampler && GLTFUtils.parseSampler(texture, samplerInfo);
|
|
4778
|
-
return texture;
|
|
4779
|
-
});
|
|
4780
|
-
context._addTaskCompletePromise(texture);
|
|
4781
|
-
} else {
|
|
4782
|
-
var bufferView = glTF.bufferViews[bufferViewIndex];
|
|
4783
|
-
texture = context.get(GLTFParserType.Buffer).then(function(buffers) {
|
|
4784
|
-
var buffer = buffers[bufferView.buffer];
|
|
4785
|
-
var imageBuffer = new Uint8Array(buffer, bufferView.byteOffset, bufferView.byteLength);
|
|
4786
|
-
return GLTFUtils.loadImageBuffer(imageBuffer, mimeType).then(function(image) {
|
|
4787
|
-
var _samplerInfo;
|
|
4788
|
-
var texture = new Texture2D(engine, image.width, image.height, undefined, (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap);
|
|
4789
|
-
texture.setImageSource(image);
|
|
4790
|
-
texture.generateMipmaps();
|
|
4791
|
-
texture.name = textureName || imageName || "texture_" + index;
|
|
4792
|
-
useSampler && GLTFUtils.parseSampler(texture, samplerInfo);
|
|
4793
|
-
var bufferTextureRestoreInfo = new BufferTextureRestoreInfo(texture, bufferView, mimeType);
|
|
4794
|
-
context.contentRestorer.bufferTextures.push(bufferTextureRestoreInfo);
|
|
4795
|
-
return texture;
|
|
4796
|
-
});
|
|
4797
|
-
});
|
|
4798
|
-
}
|
|
4759
|
+
texture = GLTFTextureParser._parseTexture(context, imageIndex, textureIndex, sampler, textureName);
|
|
4799
4760
|
}
|
|
4800
4761
|
return Promise.resolve(texture).then(function(texture) {
|
|
4801
4762
|
GLTFParser.executeExtensionsAdditiveAndParse(extensions, context, texture, textureInfo);
|
|
@@ -4804,7 +4765,51 @@ var GLTFTextureParser = (_GLTFTextureParser = /*#__PURE__*/ function(GLTFParser1
|
|
|
4804
4765
|
return texture;
|
|
4805
4766
|
});
|
|
4806
4767
|
};
|
|
4807
|
-
|
|
4768
|
+
/** @internal */ GLTFTextureParser1._parseTexture = function _parseTexture(context, imageIndex, textureIndex, sampler, textureName) {
|
|
4769
|
+
var glTFResource = context.glTFResource, glTF = context.glTF;
|
|
4770
|
+
var engine = glTFResource.engine, url = glTFResource.url;
|
|
4771
|
+
var _glTF_images_imageIndex = glTF.images[imageIndex], uri = _glTF_images_imageIndex.uri, bufferViewIndex = _glTF_images_imageIndex.bufferView, mimeType = _glTF_images_imageIndex.mimeType, imageName = _glTF_images_imageIndex.name;
|
|
4772
|
+
var useSampler = sampler !== undefined;
|
|
4773
|
+
var samplerInfo = useSampler && GLTFUtils.getSamplerInfo(glTF.samplers[sampler]);
|
|
4774
|
+
var texture;
|
|
4775
|
+
if (uri) {
|
|
4776
|
+
var _samplerInfo;
|
|
4777
|
+
var extIndex = uri.lastIndexOf(".");
|
|
4778
|
+
var ext = uri.substring(extIndex + 1);
|
|
4779
|
+
var type = ext.startsWith("ktx") ? AssetType.KTX : AssetType.Texture2D;
|
|
4780
|
+
texture = engine.resourceManager.load({
|
|
4781
|
+
url: Utils.resolveAbsoluteUrl(url, uri),
|
|
4782
|
+
type: type,
|
|
4783
|
+
params: {
|
|
4784
|
+
mipmap: (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap
|
|
4785
|
+
}
|
|
4786
|
+
}).onProgress(undefined, context._onTaskDetail).then(function(texture) {
|
|
4787
|
+
texture.name = textureName || imageName || texture.name || "texture_" + textureIndex;
|
|
4788
|
+
useSampler && GLTFUtils.parseSampler(texture, samplerInfo);
|
|
4789
|
+
return texture;
|
|
4790
|
+
});
|
|
4791
|
+
context._addTaskCompletePromise(texture);
|
|
4792
|
+
} else {
|
|
4793
|
+
var bufferView = glTF.bufferViews[bufferViewIndex];
|
|
4794
|
+
texture = context.get(GLTFParserType.Buffer).then(function(buffers) {
|
|
4795
|
+
var buffer = buffers[bufferView.buffer];
|
|
4796
|
+
var imageBuffer = new Uint8Array(buffer, bufferView.byteOffset, bufferView.byteLength);
|
|
4797
|
+
return GLTFUtils.loadImageBuffer(imageBuffer, mimeType).then(function(image) {
|
|
4798
|
+
var _samplerInfo;
|
|
4799
|
+
var texture = new Texture2D(engine, image.width, image.height, undefined, (_samplerInfo = samplerInfo) == null ? void 0 : _samplerInfo.mipmap);
|
|
4800
|
+
texture.setImageSource(image);
|
|
4801
|
+
texture.generateMipmaps();
|
|
4802
|
+
texture.name = textureName || imageName || "texture_" + textureIndex;
|
|
4803
|
+
useSampler && GLTFUtils.parseSampler(texture, samplerInfo);
|
|
4804
|
+
var bufferTextureRestoreInfo = new BufferTextureRestoreInfo(texture, bufferView, mimeType);
|
|
4805
|
+
context.contentRestorer.bufferTextures.push(bufferTextureRestoreInfo);
|
|
4806
|
+
return texture;
|
|
4807
|
+
});
|
|
4808
|
+
});
|
|
4809
|
+
}
|
|
4810
|
+
return texture;
|
|
4811
|
+
};
|
|
4812
|
+
return GLTFTextureParser1;
|
|
4808
4813
|
}(GLTFParser), function() {
|
|
4809
4814
|
var _obj;
|
|
4810
4815
|
/** @internal */ _GLTFTextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = TextureWrapMode$1.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = TextureWrapMode$1.Mirror, _obj[TextureWrapMode.REPEAT] = TextureWrapMode$1.Repeat, _obj);
|
|
@@ -6870,5 +6875,38 @@ KHR_materials_anisotropy = __decorate([
|
|
|
6870
6875
|
registerGLTFExtension("KHR_materials_anisotropy", GLTFExtensionMode.AdditiveParse)
|
|
6871
6876
|
], KHR_materials_anisotropy);
|
|
6872
6877
|
|
|
6878
|
+
var EXT_texture_webp = /*#__PURE__*/ function(GLTFExtensionParser1) {
|
|
6879
|
+
_inherits(EXT_texture_webp, GLTFExtensionParser1);
|
|
6880
|
+
function EXT_texture_webp() {
|
|
6881
|
+
var _this;
|
|
6882
|
+
_this = GLTFExtensionParser1.call(this) || this;
|
|
6883
|
+
_this._supportWebP = false;
|
|
6884
|
+
var testCanvas = document.createElement("canvas");
|
|
6885
|
+
testCanvas.width = testCanvas.height = 1;
|
|
6886
|
+
_this._supportWebP = testCanvas.toDataURL("image/webp").indexOf("data:image/webp") == 0;
|
|
6887
|
+
return _this;
|
|
6888
|
+
}
|
|
6889
|
+
var _proto = EXT_texture_webp.prototype;
|
|
6890
|
+
_proto.createAndParse = function createAndParse(context, schema, textureInfo, textureIndex) {
|
|
6891
|
+
var _this = this;
|
|
6892
|
+
return _async_to_generator(function() {
|
|
6893
|
+
var webPIndex, sampler, tmp, fallbackIndex, textureName, texture;
|
|
6894
|
+
return __generator(this, function(_state) {
|
|
6895
|
+
webPIndex = schema.source;
|
|
6896
|
+
sampler = textureInfo.sampler, tmp = textureInfo.source, fallbackIndex = tmp === void 0 ? 0 : tmp, textureName = textureInfo.name;
|
|
6897
|
+
texture = GLTFTextureParser._parseTexture(context, _this._supportWebP ? webPIndex : fallbackIndex, textureIndex, sampler, textureName);
|
|
6898
|
+
return [
|
|
6899
|
+
2,
|
|
6900
|
+
texture
|
|
6901
|
+
];
|
|
6902
|
+
});
|
|
6903
|
+
})();
|
|
6904
|
+
};
|
|
6905
|
+
return EXT_texture_webp;
|
|
6906
|
+
}(GLTFExtensionParser);
|
|
6907
|
+
EXT_texture_webp = __decorate([
|
|
6908
|
+
registerGLTFExtension("EXT_texture_webp", GLTFExtensionMode.CreateAndParse)
|
|
6909
|
+
], EXT_texture_webp);
|
|
6910
|
+
|
|
6873
6911
|
export { AccessorType, AnimationClipDecoder, BufferInfo, BufferReader, EditorTextureLoader, FileHeader, GLTFAnimationParser, GLTFAnimatorControllerParser, GLTFBufferParser, GLTFBufferViewParser, GLTFEntityParser, GLTFExtensionMode, GLTFExtensionParser, GLTFLoader, GLTFMaterialParser, GLTFMeshParser, GLTFParser, GLTFParserContext, GLTFParserType, GLTFResource, GLTFSceneParser, GLTFSchemaParser, GLTFSkinParser, GLTFTextureParser, GLTFUtils, GLTFValidator, InterpolableValueType, KTX2Loader, KTX2TargetFormat, KTX2Transcoder, MeshDecoder, MeshLoader$1 as MeshLoader, ParserContext, ParserType, PrefabResource, ReflectionParser, SceneParser, SpecularMode, Texture2DDecoder, decode, decoder, decoderMap, parseSingleKTX, registerGLTFExtension, registerGLTFParser };
|
|
6874
6912
|
//# sourceMappingURL=module.js.map
|