Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines a DualShock gamepad

Hierarchy

Index

Constructors

  • new DualShockPad(id: string, index: number, gamepad: any): DualShockPad
  • Creates a new DualShock gamepad object

    Parameters

    • id: string

      defines the id of this gamepad

    • index: number

      defines its index

    • gamepad: any

      defines the internal HTML gamepad object

    Returns DualShockPad

Properties

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

Represents an Dual Shock controller

GAMEPAD: number

Represents a gamepad controller

GENERIC: number

Represents a generic controller

POSE_ENABLED: number

Represents a pose-enabled controller

XBOX: number

Represents an XBox controller

Accessors

  • get buttonCircle(): number
  • set buttonCircle(value: number): void
  • Gets the value of the Circle button

    Returns number

  • Sets the value of the Circle button

    Parameters

    • value: number

    Returns void

  • get buttonCross(): number
  • set buttonCross(value: number): void
  • Gets the value of the Cross button

    Returns number

  • Sets the value of the Cross button

    Parameters

    • value: number

    Returns void

  • get buttonL1(): number
  • set buttonL1(value: number): void
  • Gets the value of the L1 button

    Returns number

  • Sets the value of the L1 button

    Parameters

    • value: number

    Returns void

  • get buttonLeftStick(): number
  • set buttonLeftStick(value: number): void
  • Gets the value of the Left joystick

    Returns number

  • Sets the value of the Left joystick

    Parameters

    • value: number

    Returns void

  • get buttonOptions(): number
  • set buttonOptions(value: number): void
  • Gets the value of the Options button

    Returns number

  • Sets the value of the Options button

    Parameters

    • value: number

    Returns void

  • get buttonR1(): number
  • set buttonR1(value: number): void
  • Gets the value of the R1 button

    Returns number

  • Sets the value of the R1 button

    Parameters

    • value: number

    Returns void

  • get buttonRightStick(): number
  • set buttonRightStick(value: number): void
  • Gets the value of the Right joystick

    Returns number

  • Sets the value of the Right joystick

    Parameters

    • value: number

    Returns void

  • get buttonShare(): number
  • set buttonShare(value: number): void
  • Gets the value of the Share button

    Returns number

  • Sets the value of the Share button

    Parameters

    • value: number

    Returns void

  • get buttonSquare(): number
  • set buttonSquare(value: number): void
  • Gets the value of the Square button

    Returns number

  • Sets the value of the Square button

    Parameters

    • value: number

    Returns void

  • get buttonTriangle(): number
  • set buttonTriangle(value: number): void
  • Gets the value of the Triangle button

    Returns number

  • Sets the value of the Triangle button

    Parameters

    • value: number

    Returns void

  • get dPadDown(): number
  • set dPadDown(value: number): void
  • Gets the value of D-pad down

    Returns number

  • Sets the value of D-pad down

    Parameters

    • value: number

    Returns void

  • get dPadLeft(): number
  • set dPadLeft(value: number): void
  • Gets the value of D-pad left

    Returns number

  • Sets the value of D-pad left

    Parameters

    • value: number

    Returns void

  • get dPadRight(): number
  • set dPadRight(value: number): void
  • Gets the value of D-pad right

    Returns number

  • Sets the value of D-pad right

    Parameters

    • value: number

    Returns void

  • get dPadUp(): number
  • set dPadUp(value: number): void
  • Gets the value of D-pad up

    Returns number

  • Sets the value of D-pad up

    Parameters

    • value: number

    Returns void

  • get isConnected(): boolean
  • Specifies if the gamepad has been connected

    Returns boolean

  • Gets the left joystick

    Returns StickValues

  • Sets the left joystick values

    Parameters

    Returns void

  • get leftTrigger(): number
  • set leftTrigger(newValue: number): void
  • Gets the left trigger value

    Returns number

  • Sets the left trigger value

    Parameters

    • newValue: number

    Returns void

  • Gets the right joystick

    Returns StickValues

  • Sets the right joystick value

    Parameters

    Returns void

  • get rightTrigger(): number
  • set rightTrigger(newValue: number): void
  • Gets the right trigger value

    Returns number

  • Sets the right trigger value

    Parameters

    • newValue: number

    Returns void

Methods

  • dispose(): void
  • Disposes the gamepad

    Returns void

  • Defines the callback to call when a button is pressed

    Parameters

    Returns void

  • Defines the callback to call when a button is released

    Parameters

    Returns void

  • Defines the callback to call when a pad is pressed

    Parameters

    Returns void

  • Defines the callback to call when a pad is released

    Parameters

    Returns void

  • onleftstickchanged(callback: (values: StickValues) => void): void
  • onlefttriggerchanged(callback: (value: number) => void): void
  • Defines the callback to call when left trigger is pressed

    Parameters

    • callback: (value: number) => void

      defines the callback to use

        • (value: number): void
        • Parameters

          • value: number

          Returns void

    Returns void

  • onrightstickchanged(callback: (values: StickValues) => void): void
  • onrighttriggerchanged(callback: (value: number) => void): void
  • Defines the callback to call when right trigger is pressed

    Parameters

    • callback: (value: number) => void

      defines the callback to use

        • (value: number): void
        • Parameters

          • value: number

          Returns void

    Returns void

  • update(): void
  • Force the gamepad to synchronize with device values

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Property
  • Method
  • Static method

Settings

Theme