Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines a XBox360 gamepad

Hierarchy

Index

Constructors

  • new Xbox360Pad(id: string, index: number, gamepad: any, xboxOne?: boolean): Xbox360Pad
  • Creates a new XBox360 gamepad object

    Parameters

    • id: string

      defines the id of this gamepad

    • index: number

      defines its index

    • gamepad: any

      defines the internal HTML gamepad object

    • Optional xboxOne: boolean

      defines if it is a XBox One gamepad

    Returns Xbox360Pad

Properties

browserGamepad: any

The browser gamepad

id: string

The id of the gamepad

index: number

The index of the gamepad

onButtonDownObservable: Observable<Xbox360Button>

Observable raised when a button is pressed

onButtonUpObservable: Observable<Xbox360Button>

Observable raised when a button is released

onPadDownObservable: Observable<Xbox360Dpad>

Observable raised when a pad is pressed

onPadUpObservable: Observable<Xbox360Dpad>

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 buttonA(): number
  • set buttonA(value: number): void
  • Gets the value of the A button

    Returns number

  • Sets the value of the A button

    Parameters

    • value: number

    Returns void

  • get buttonB(): number
  • set buttonB(value: number): void
  • Gets the value of the B button

    Returns number

  • Sets the value of the B button

    Parameters

    • value: number

    Returns void

  • get buttonBack(): number
  • set buttonBack(value: number): void
  • Gets the value of the Back button

    Returns number

  • Sets the value of the Back button

    Parameters

    • value: number

    Returns void

  • get buttonLB(): number
  • set buttonLB(value: number): void
  • Gets the value of the Left button

    Returns number

  • Sets the value of the Left 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 buttonRB(): number
  • set buttonRB(value: number): void
  • Gets the value of the Right button

    Returns number

  • Sets the value of the Right 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 buttonStart(): number
  • set buttonStart(value: number): void
  • Gets the value of the Start button

    Returns number

  • Sets the value of the Start button

    Parameters

    • value: number

    Returns void

  • get buttonX(): number
  • set buttonX(value: number): void
  • Gets the value of the X button

    Returns number

  • Sets the value of the X button

    Parameters

    • value: number

    Returns void

  • get buttonY(): number
  • set buttonY(value: number): void
  • Gets the value of the Y button

    Returns number

  • Sets the value of the Y 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

  • onbuttondown(callback: (buttonPressed: Xbox360Button) => void): void
  • Defines the callback to call when a button is pressed

    Parameters

    Returns void

  • onbuttonup(callback: (buttonReleased: Xbox360Button) => void): void
  • Defines the callback to call when a button is released

    Parameters

    Returns void

  • ondpaddown(callback: (dPadPressed: Xbox360Dpad) => void): void
  • Defines the callback to call when a pad is pressed

    Parameters

    Returns void

  • ondpadup(callback: (dPadReleased: Xbox360Dpad) => void): 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