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) 1.21 kB
import{R as t,b as e}from"./declarationMapper-D_filC93.esm.min.js";import{F as o}from"./flowGraphCachedOperationBlock-CIvATd1Y.esm.min.js";import{u as r}from"./index-BPURObVq.esm.min.js";import"./KHR_interactivity-D4lwBSW9.esm.min.js";import"./objectModelMapping-ClgDmo5Q.esm.min.js";import"./spotLight.pure-5s2DDDIt.esm.min.js";class s extends o{constructor(o){super(t,o),this.config=o,this.object=this.registerDataInput("object",t,o.object),this.propertyName=this.registerDataInput("propertyName",e,o.propertyName),this.customGetFunction=this.registerDataInput("customGetFunction",t)}_doOperation(t){const e=this.customGetFunction.getValue(t);let o;if(e)o=e(this.object.getValue(t),this.propertyName.getValue(t),t);else{const e=this.object.getValue(t),r=this.propertyName.getValue(t);o=e&&r?this._getPropertyValue(e,r):void 0}return o}_getPropertyValue(t,e){const o=e.split(".");let r=t;for(const t of o)if(r=r[t],void 0===r)return;return r}getClassName(){return"FlowGraphGetPropertyBlock"}}let i=!1;function p(){i||(i=!0,r("FlowGraphGetPropertyBlock",s))}p();export{s as FlowGraphGetPropertyBlock,p as RegisterFlowGraphGetPropertyBlock}; //# sourceMappingURL=flowGraphGetPropertyBlock-CC8r-9mu.esm.min.js.map