import{GLTFLoader as u}from"./glTFLoader-f5CXkgzs.js";import{aG as h,aH as f}from"./index-T8LZyOXI.js";import"./index-BkylzejB.js";import"./bone-DGunMt7J.js";import"./skeleton-00tPGJ0X.js";import"./rawTexture-Duv-4ySK.js";import"./assetContainer-DNTqZfyb.js";import"./objectModelMapping-D1pI71RW.js";const n="KHR_materials_diffuse_roughness";class d{constructor(s){this.name=n,this.order=190,this._loader=s,this.enabled=this._loader.isExtensionUsed(n)}dispose(){this._loader=null}loadMaterialPropertiesAsync(s,e,o){return u.LoadExtensionAsync(s,e,this.name,async(t,i)=>{const r=new Array;return r.push(this._loader.loadMaterialPropertiesAsync(s,e,o)),r.push(this._loadDiffuseRoughnessPropertiesAsync(t,i,o)),await Promise.all(r).then(()=>{})})}_loadDiffuseRoughnessPropertiesAsync(s,e,o){const t=this._loader._getOrCreateMaterialAdapter(o),i=new Array;return t.baseDiffuseRoughness=e.diffuseRoughnessFactor??0,e.diffuseRoughnessTexture&&i.push(this._loader.loadTextureInfoAsync(`${s}/diffuseRoughnessTexture`,e.diffuseRoughnessTexture,r=>{r.name=`${o.name} (Diffuse Roughness)`,t.baseDiffuseRoughnessTexture=r})),Promise.all(i).then(()=>{})}}h(n);f(n,!0,a=>new d(a));export{d as KHR_materials_diffuse_roughness};
