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

controllerId: number;

name

name: string;

connected

connected: boolean;

Methods

getAxisTrigger

getAxisTrigger(axis: ControllerAxis): AxisTrigger;

getGlobalAxisTrigger

Creates an axis binding without selecting a specific controller.

static getGlobalAxisTrigger(axis: ControllerAxis): AxisTrigger;

getButtonTrigger

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