API

Class DualShockPad

Defines a DualShock gamepad

Hierarchy (View Summary)

Index
browserGamepad: any

The browser gamepad

id: string

The id of the gamepad

index: number

The index of the gamepad

onButtonDownObservable: Observable<DualShockButton> = ...

Observable raised when a button is pressed

onButtonUpObservable: Observable<DualShockButton> = ...

Observable raised when a button is released

onPadDownObservable: Observable<DualShockDpad> = ...

Observable raised when a pad is pressed

onPadUpObservable: Observable<DualShockDpad> = ...

Observable raised when a pad is released

type: number

Specifies what type of gamepad this represents

DUALSHOCK: number = 4

Represents an Dual Shock controller

GAMEPAD: number = 0

Represents a gamepad controller

GENERIC: number = 1

Represents a generic controller

POSE_ENABLED: number = 3

Represents a pose-enabled controller

XBOX: number = 2

Represents an XBox controller

  • Defines the callback to call when left trigger is pressed

    Parameters

    • callback: (value: number) => void

      defines the callback to use

    Returns void

  • Defines the callback to call when right trigger is pressed

    Parameters

    • callback: (value: number) => void

      defines the callback to use

    Returns void