Atlas Engine
API Referenceatlas

Gamepad

Connected gamepad access, trigger creation, and vibration control.

Module: atlas

Connected gamepad access, trigger creation, and vibration control.

Declaration

export class Gamepad { ... }

Properties

controllerId

The runtime controller identifier.

controllerId: number;

name

The human-readable name.

name: string;

connected

Whether the input device is currently connected.

connected: boolean;

Methods

getAxisTrigger

Returns axis trigger.

getAxisTrigger(axis: ControllerAxis): AxisTrigger;

getGlobalAxisTrigger

Creates an axis binding without selecting a specific controller.

static getGlobalAxisTrigger(axis: ControllerAxis): AxisTrigger;

getButtonTrigger

Returns button trigger.

getButtonTrigger(button: ControllerButton): Trigger;

getGlobalButtonTrigger

Creates a button binding without selecting a specific controller.

static getGlobalButtonTrigger(button: ControllerButton): Trigger;

runble

Requests controller vibration. The method name retains the spelling used by this declaration.

runble(strength: number, duration: number): void;

On this page