import{GLTFLoader as l}from"./glTFLoader-Bx351I09.js";import{F as u,aN as d,aO as p}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 h="KHR_materials_sheen";class c{constructor(r){this.name=h,this.order=190,this._loader=r,this.enabled=this._loader.isExtensionUsed(h)}dispose(){this._loader=null}loadMaterialPropertiesAsync(r,e,s){return l.LoadExtensionAsync(r,e,this.name,async(o,n)=>{const t=new Array;return t.push(this._loader.loadMaterialPropertiesAsync(r,e,s)),t.push(this._loadSheenPropertiesAsync(o,n,s)),await Promise.all(t).then(()=>{})})}_loadSheenPropertiesAsync(r,e,s){const o=this._loader._getOrCreateMaterialAdapter(s),n=new Array;o.configureFuzz();const t=e.sheenColorFactor!==void 0?u.FromArray(e.sheenColorFactor):u.Black(),m=e.sheenRoughnessFactor!==void 0?e.sheenRoughnessFactor:0;return o.fuzzWeight=1,o.fuzzColor=t,o.fuzzRoughness=m,e.sheenColorTexture&&n.push(this._loader.loadTextureInfoAsync(`${r}/sheenColorTexture`,e.sheenColorTexture,i=>{i.name=`${s.name} (Sheen Color)`,o.fuzzColorTexture=i})),e.sheenRoughnessTexture&&(e.sheenRoughnessTexture.nonColorData=!0,n.push(this._loader.loadTextureInfoAsync(`${r}/sheenRoughnessTexture`,e.sheenRoughnessTexture,i=>{i.name=`${s.name} (Sheen Roughness)`,o.fuzzRoughnessTexture=i}))),Promise.all(n).then(()=>{})}}d(h);p(h,!0,a=>new c(a));export{c as KHR_materials_sheen};
