API Referenceatlasatlas/input
Trigger
Digital input binding. Use a factory to populate the fields corresponding to its type.
Module: atlas/input
Digital input binding. Use a factory to populate the fields corresponding to its type.
Declaration
export class Trigger { ... }Properties
type
The category or discriminator for this value.
type: TriggerType;mouseButton
The optional mouse button.
mouseButton?: MouseButton;key
The optional key.
key?: Key;controllerButton
The optional controller button.
controllerButton?: ControllerButtonTrigger;Methods
fromKey
Creates a value from key.
static fromKey(key: Key): Trigger;fromMouseButton
Creates a value from mouse button.
static fromMouseButton(mouseButton: MouseButton): Trigger;fromControllerButton
Creates a value from controller button.
static fromControllerButton(
controllerID: number,
buttonIndex: number,
): Trigger;