import{GLTFLoader as o,ArrayItem as a}from"./glTFLoader-Bp7IfGPK.js";import{aG as u,aH as _}from"./index-CDrXokXW.js";import"./index-DWyDLubb.js";import"./bone-z620UXj2.js";import"./skeleton-3aE04lM6.js";import"./rawTexture-DYLCXHMF.js";import"./assetContainer-D7EiOqw6.js";import"./objectModelMapping-CGWnurZP.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};
