import{T as d,aG as c,aH as m}from"./index-CDrXokXW.js";import{GLTFLoader as p}from"./glTFLoader-Bp7IfGPK.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="KHR_texture_transform";class n{constructor(o){this.name=s,this._loader=o,this.enabled=this._loader.isExtensionUsed(s)}dispose(){this._loader=null}loadTextureInfoAsync(o,a,f){return p.LoadExtensionAsync(o,a,this.name,async(e,t)=>await this._loader.loadTextureInfoAsync(o,a,r=>{if(!(r instanceof d))throw new Error(`${e}: Texture type not supported`);t.offset&&(r.uOffset=t.offset[0],r.vOffset=t.offset[1]),r.uRotationCenter=0,r.vRotationCenter=0,t.rotation&&(r.wAng=-t.rotation),t.scale&&(r.uScale=t.scale[0],r.vScale=t.scale[1]),t.texCoord!=null&&(r.coordinatesIndex=t.texCoord),f(r)}))}}c(s);m(s,!0,i=>new n(i));export{n as KHR_texture_transform};
