import{GLTFLoader as l}from"./glTFLoader-Bx351I09.js";import{aN as d,aO as c}from"./index-6jOCfdig.js";import"./index-Ds2meNS5.js";import"./svelte/svelte_svelte.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_client.js";import"./svelte/svelte_internal_flags_async.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";import"./bone-DdTyU8i_.js";import"./skeleton-C0c5yg7x.js";import"./rawTexture-CpjOe2U7.js";import"./assetContainer-Drc86vic.js";import"./objectModelMapping-DT0r674A.js";const n="KHR_materials_anisotropy";class _{constructor(t){this.name=n,this.order=195,this._loader=t,this.enabled=this._loader.isExtensionUsed(n)}dispose(){this._loader=null}loadMaterialPropertiesAsync(t,o,i){return l.LoadExtensionAsync(t,o,this.name,async(r,e)=>{const s=new Array;s.push(this._loader.loadMaterialPropertiesAsync(t,o,i)),s.push(this._loadAnisotropyPropertiesAsync(r,e,i)),await Promise.all(s)})}async _loadAnisotropyPropertiesAsync(t,o,i){const r=this._loader._getOrCreateMaterialAdapter(i),e=new Array,s=o.anisotropyStrength??0,y=o.anisotropyRotation??0;r.specularRoughnessAnisotropy=s,r.geometryTangentAngle=y;const p=o.extensions??{};(!p.EXT_materials_anisotropy_openpbr||!p.EXT_materials_anisotropy_openpbr.openPbrAnisotropyEnabled)&&r.configureGltfStyleAnisotropy(!0),o.anisotropyTexture&&(o.anisotropyTexture.nonColorData=!0,e.push(this._loader.loadTextureInfoAsync(`${t}/anisotropyTexture`,o.anisotropyTexture,m=>{m.name=`${i.name} (Anisotropy Intensity)`,r.geometryTangentTexture=m}))),await Promise.all(e)}}d(n);c(n,!0,a=>new _(a));export{_ as KHR_materials_anisotropy};
