import{GLTFLoader as f}from"./glTFLoader-Bx351I09.js";import{F as u,aN as p,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 n="KHR_materials_diffuse_transmission";class l{constructor(s){this.name=n,this.order=174,this._loader=s,this.enabled=this._loader.isExtensionUsed(n),this.enabled&&(s.parent.transparencyAsCoverage=!0)}dispose(){this._loader=null}loadMaterialPropertiesAsync(s,a,o){return f.LoadExtensionAsync(s,a,this.name,async(r,i)=>{const e=new Array;return e.push(this._loader.loadMaterialPropertiesAsync(s,a,o)),e.push(this._loadTranslucentPropertiesAsync(r,a,o,i)),await Promise.all(e).then(()=>{})})}_loadTranslucentPropertiesAsync(s,a,o,r){const i=this._loader._getOrCreateMaterialAdapter(o);i.configureSubsurface(),i.subsurfaceWeight=r.diffuseTransmissionFactor??0,i.subsurfaceColor=r.diffuseTransmissionColorFactor!==void 0?u.FromArray(r.diffuseTransmissionColorFactor):u.White();const e=new Array;return r.diffuseTransmissionTexture&&(r.diffuseTransmissionTexture.nonColorData=!0,e.push(this._loader.loadTextureInfoAsync(`${s}/diffuseTransmissionTexture`,r.diffuseTransmissionTexture).then(t=>{t.name=`${o.name} (Diffuse Transmission)`,i.subsurfaceWeightTexture=t}))),r.diffuseTransmissionColorTexture&&e.push(this._loader.loadTextureInfoAsync(`${s}/diffuseTransmissionColorTexture`,r.diffuseTransmissionColorTexture).then(t=>{t.name=`${o.name} (Diffuse Transmission Color)`,i.subsurfaceColorTexture=t})),Promise.all(e).then(()=>{})}}p(n);d(n,!0,m=>new l(m));export{l as KHR_materials_diffuse_transmission};
