UNPKG

@babylonjs/viewer

Version:

The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.

3 lines (2 loc) 654 B
const e={id:"KHR_materials_sheen",async applyMaterial(e,t){const n=e._rawMatDef?.extensions?.KHR_materials_sheen;if(!n)return null;const s=await t._texture(n.sheenColorTexture,!0),r=n.sheenRoughnessTexture,o=r&&n.sheenColorTexture&&r.index===n.sheenColorTexture.index&&r.extensions?.KHR_texture_transform===n.sheenColorTexture.extensions?.KHR_texture_transform,a=r&&!o?await t._texture(r,!1):void 0;return{sheen:{isEnabled:!0,color:n.sheenColorFactor??[0,0,0],roughness:n.sheenRoughnessFactor??0,intensity:1,texture:s,...a?{roughnessTexture:a}:void 0,albedoScaling:!0}}}};export{e as default}; //# sourceMappingURL=gltf-ext-sheen-WsVIFbMR.esm.min.js.map