File: Controls.md | Updated: 11/15/2025
Abstract base class for controls.
Constructs a new controls instance.
object | The object that is managed by the controls.
---|---
domElement | The HTML element used for event listeners. Default is null.
The HTML element used for event listeners.
Default is null.
Whether the controls responds to user input or not.
Default is true.
This object defines the keyboard input of the controls.
This object defines what type of actions are assigned to the available mouse buttons. It depends on the control implementation what kind of mouse buttons and actions are supported.
The object that is managed by the controls.
The internal state of the controls.
Default is -1.
This object defines what type of actions are assigned to what kind of touch interaction. It depends on the control implementation what kind of touch interaction and actions are supported.
Connects the controls to the DOM. This method has so called "side effects" since it adds the module's event listeners to the DOM.
element | The DOM element to connect to.
---|---
Disconnects the controls from the DOM.
Call this method if you no longer want use to the controls. It frees all internal resources and removes all event listeners.
Controls should implement this method if they have to update their internal state per simulation step.
delta | The time delta in seconds.
---|---