import{GLTFLoader as m}from"./glTFLoader-Bx351I09.js";import{aN as a,aO as d}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 c="KHR_materials_iridescence";class h{constructor(s){this.name=c,this.order=195,this._loader=s,this.enabled=this._loader.isExtensionUsed(c)}dispose(){this._loader=null}loadMaterialPropertiesAsync(s,e,n){return m.LoadExtensionAsync(s,e,this.name,async(r,t)=>{const i=new Array;return i.push(this._loader.loadMaterialPropertiesAsync(s,e,n)),i.push(this._loadIridescencePropertiesAsync(r,t,n)),await Promise.all(i).then(()=>{})})}_loadIridescencePropertiesAsync(s,e,n){const r=this._loader._getOrCreateMaterialAdapter(n),t=new Array;return r.thinFilmWeight=e.iridescenceFactor??0,r.thinFilmIor=e.iridescenceIor??e.iridescenceIOR??1.3,r.thinFilmThicknessMinimum=e.iridescenceThicknessMinimum??100,r.thinFilmThicknessMaximum=e.iridescenceThicknessMaximum??400,e.iridescenceTexture&&t.push(this._loader.loadTextureInfoAsync(`${s}/iridescenceTexture`,e.iridescenceTexture,i=>{i.name=`${n.name} (Iridescence)`,r.thinFilmWeightTexture=i})),e.iridescenceThicknessTexture&&t.push(this._loader.loadTextureInfoAsync(`${s}/iridescenceThicknessTexture`,e.iridescenceThicknessTexture,i=>{i.name=`${n.name} (Iridescence Thickness)`,r.thinFilmThicknessTexture=i})),Promise.all(t).then(()=>{})}}a(c);d(c,!0,o=>new h(o));export{h as KHR_materials_iridescence};
