@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) • 1.1 kB
JavaScript
import{bM as e,bJ as s,bI as r}from"./index-Bw2N6w1y.esm.min.js";import{GLTFLoader as o}from"./glTFLoader-DEYqxGxH.esm.min.js";import"./bone-BwMp7T0B.esm.min.js";import"./skeleton-CkTZwWbM.esm.min.js";import"./rawTexture-CPAqHIA7.esm.min.js";import"./assetContainer-21j7tcC8.esm.min.js";import"./objectModelMapping-DX92iJ8M.esm.min.js";const i="KHR_materials_ior";class t{constructor(e){this.name=i,this.order=180,this._loader=e,this.enabled=this._loader.isExtensionUsed(i)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,s,r){return o.LoadExtensionAsync(e,s,this.name,(async(o,i)=>{const t=new Array;return t.push(this._loader.loadMaterialPropertiesAsync(e,s,r)),t.push(this._loadIorPropertiesAsync(o,i,r)),await Promise.all(t).then((()=>{}))}))}_loadIorPropertiesAsync(s,r,o){if(!(o instanceof e))throw new Error(`${s}: Material type not supported`);return void 0!==r.ior?o.indexOfRefraction=r.ior:o.indexOfRefraction=t._DEFAULT_IOR,Promise.resolve()}}t._DEFAULT_IOR=1.5,s(i),r(i,!0,(e=>new t(e)));export{t as KHR_materials_ior};
//# sourceMappingURL=KHR_materials_ior-DhDo9PTX.esm.min.js.map