import{GLTFLoader as o,ArrayItem as a}from"./glTFLoader-f5CXkgzs.js";import{aG as u,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 s="EXT_texture_webp";class c{constructor(e){this.name=s,this._loader=e,this.enabled=e.isExtensionUsed(s)}dispose(){this._loader=null}_loadTextureAsync(e,r,i){return o.LoadExtensionAsync(e,r,this.name,async(n,m)=>{const l=r.sampler==null?o.DefaultSampler:a.Get(`${e}/sampler`,this._loader.gltf.samplers,r.sampler),p=a.Get(`${n}/source`,this._loader.gltf.images,m.source);return await this._loader._createTextureAsync(e,l,p,d=>{i(d)},void 0,!r._textureInfo.nonColorData)})}}u(s);_(s,!0,t=>new c(t));export{c as EXT_texture_webp};
