Event Handling

Table of contents

Event Handling

There are two features of Babylon.js that handle events, actions and observables. It is also possible to use plain Javascript.

Using actions events are managed with the actionManager along with triggers such as onPickTrigger to determine if a mesh is clicked or touched or onKeyDown to determine if a key is pressed during a scene.

Observables are the latest addition to Babylon.js and their aim is to make event handling within Babylon.js more consistent and coherent for developers of Babylon.js. A particular use is with the Babylon.GUI