API

Events

Event Handling

Naturally, the main sources of events are the mouse, keyboard, touch, device movement, and game controllers. In this section, we will consider how to manage some of these. In terms of coding, Babylon.js has two features that handle events: actions and observables. It is also possible to use plain JavaScript.

Coming next

Observables
Learn all about observables in Babylon.js.
Observables
Actions
Learn how to use actions in Babylon.js.
Actions
Promises
Learn all about the power of promises in Babylon.js.
Promises
Coroutines
Easily extend logic over time with Babylon.js coroutines.
Coroutines