shadow$provide.module$node_modules$pixi_DOT_js$lib$compressed_textures$ktx2$loadKTX2 = function(global, require, module, exports) {
  global = require("module$node_modules$pixi_DOT_js$lib$assets$loader$parsers$LoaderParser");
  var createTexture = require("module$node_modules$pixi_DOT_js$lib$assets$loader$parsers$textures$utils$createTexture"), checkExtension = require("module$node_modules$pixi_DOT_js$lib$assets$utils$checkExtension");
  module = require("module$node_modules$pixi_DOT_js$lib$extensions$Extensions");
  var CompressedSource = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$texture$sources$CompressedSource"), getSupportedTextureFormats = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$texture$utils$getSupportedTextureFormats"), getResolutionOfUrl = require("module$node_modules$pixi_DOT_js$lib$utils$network$getResolutionOfUrl"), loadKTX2onWorker = require("module$node_modules$pixi_DOT_js$lib$compressed_textures$ktx2$worker$loadKTX2onWorker");
  "use strict";
  exports.loadKTX2 = {extension:{type:module.ExtensionType.LoadParser, priority:global.LoaderParserPriority.High, name:"loadKTX2"}, name:"loadKTX2", id:"ktx2", test(url) {
    return checkExtension.checkExtension(url, ".ktx2");
  }, async load(url, asset, loader) {
    var supportedTextures = await getSupportedTextureFormats.getSupportedTextureFormats();
    supportedTextures = await loadKTX2onWorker.loadKTX2onWorker(url, supportedTextures);
    asset = new CompressedSource.CompressedSource({...supportedTextures, resolution:asset.data?.resolution || getResolutionOfUrl.getResolutionOfUrl(url)});
    return createTexture.createTexture(asset, loader, url);
  }, async unload(texture) {
    Array.isArray(texture) ? texture.forEach(t => t.destroy(!0)) : texture.destroy(!0);
  }};
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$compressed_textures$ktx2$loadKTX2.js.map
