@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.45 kB
JavaScript
import{F as t}from"./KHR_interactivity-D4lwBSW9.esm.min.js";import{u as s}from"./index-BPURObVq.esm.min.js";import{b as e,a as i}from"./declarationMapper-D_filC93.esm.min.js";import"./objectModelMapping-ClgDmo5Q.esm.min.js";import"./spotLight.pure-5s2DDDIt.esm.min.js";class a extends t{constructor(t){super(t),this.key=this.registerDataInput("key",e),this.withShift=this.registerDataInput("withShift",i),this.withCtrl=this.registerDataInput("withCtrl",i),this.withAlt=this.registerDataInput("withAlt",i),this.withMeta=this.registerDataInput("withMeta",i),this.withCommandOrCtrl=this.registerDataInput("withCommandOrCtrl",i),this.isPressed=this.registerDataOutput("isPressed",i)}_updateOutputs(t){const s=t.configuration.sceneEventCoordinator;if(!s)return void this.isPressed.setValue(!1,t);const e=s.pressedKeys,i=this.key.getValue(t);let a=!i||e.has(i);a&&this.withShift.getValue(t)&&(a=e.has("ShiftLeft")||e.has("ShiftRight")),a&&this.withCtrl.getValue(t)&&(a=e.has("ControlLeft")||e.has("ControlRight")),a&&this.withAlt.getValue(t)&&(a=e.has("AltLeft")||e.has("AltRight")),a&&this.withMeta.getValue(t)&&(a=e.has("MetaLeft")||e.has("MetaRight")),a&&this.withCommandOrCtrl.getValue(t)&&(a=e.has("CommandOrControl")),this.isPressed.setValue(a,t)}getClassName(){return"FlowGraphIsKeyPressedBlock"}}s("FlowGraphIsKeyPressedBlock",a);export{a as FlowGraphIsKeyPressedBlock};
//# sourceMappingURL=flowGraphIsKeyPressedBlock-C2pQmHfg.esm.min.js.map