import{GLTFLoader as a,ArrayItem as o}from"./glTFLoader-f5CXkgzs.js";import{aG as d,aH as _}from"./index-T8LZyOXI.js";import"./index-BkylzejB.js";import"./bone-DGunMt7J.js";import"./skeleton-00tPGJ0X.js";import"./rawTexture-Duv-4ySK.js";import"./assetContainer-DNTqZfyb.js";import"./objectModelMapping-D1pI71RW.js";const r="KHR_texture_basisu";class c{constructor(e){this.name=r,this._loader=e,this.enabled=e.isExtensionUsed(r)}dispose(){this._loader=null}_loadTextureAsync(e,s,n){return a.LoadExtensionAsync(e,s,this.name,async(i,l)=>{const m=s.sampler==null?a.DefaultSampler:o.Get(`${e}/sampler`,this._loader.gltf.samplers,s.sampler),u=o.Get(`${i}/source`,this._loader.gltf.images,l.source);return await this._loader._createTextureAsync(e,m,u,p=>{n(p)},s._textureInfo.nonColorData?{useRGBAIfASTCBC7NotAvailableWhenUASTC:!0}:void 0,!s._textureInfo.nonColorData)})}}d(r);_(r,!0,t=>new c(t));export{c as KHR_texture_basisu};
