@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.58 kB
JavaScript
import{c as e,_ as t}from"./KHR_interactivity-CKt1TdMW.esm.min.js";import{by as i,R as s}from"./index-Bw2N6w1y.esm.min.js";import{R as r,j as p,f as n}from"./declarationMapper-13w1YGqM.esm.min.js";import"./objectModelMapping-DX92iJ8M.esm.min.js";class a extends e{constructor(e){super(e),this.config=e,this.type="MeshPick",this.asset=this.registerDataInput("asset",r,e?.targetMesh),this.pickedPoint=this.registerDataOutput("pickedPoint",p),this.pickOrigin=this.registerDataOutput("pickOrigin",p),this.pointerId=this.registerDataOutput("pointerId",n),this.pickedMesh=this.registerDataOutput("pickedMesh",r),this.pointerType=this.registerDataInput("pointerType",r,i.POINTERPICK)}_getReferencedMesh(e){return this.asset.getValue(e)}_executeEvent(e,i){if(this.pointerType.getValue(e)!==i.type)return!0;const s=this._getReferencedMesh(e);return s&&i.pickInfo?.pickedMesh&&(i.pickInfo?.pickedMesh===s||t(i.pickInfo?.pickedMesh,s))?(this.pointerId.setValue(i.event.pointerId,e),this.pickOrigin.setValue(i.pickInfo.ray?.origin,e),this.pickedPoint.setValue(i.pickInfo.pickedPoint,e),this.pickedMesh.setValue(i.pickInfo.pickedMesh,e),this._execute(e),!this.config?.stopPropagation):(this.pointerId.resetToDefaultValue(e),this.pickOrigin.resetToDefaultValue(e),this.pickedPoint.resetToDefaultValue(e),this.pickedMesh.resetToDefaultValue(e),!0)}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphMeshPickEventBlock"}}s("FlowGraphMeshPickEventBlock",a);export{a as FlowGraphMeshPickEventBlock};
//# sourceMappingURL=flowGraphMeshPickEventBlock-BMGnOpW9.esm.min.js.map