Xbox360Pad

Defines a XBox360 gamepad

Hierarchy

Index

Constructors

constructor

  • 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

browserGamepad: any

buttonA

buttonA: number

Gets or sets value of A button

buttonB

buttonB: number

Gets or sets value of B button

buttonBack

buttonBack: number

Gets or sets value of Back button

buttonLB

buttonLB: number

Gets or sets value of Left button

buttonLeftStick

buttonLeftStick: number

Gets or sets value of left stick

buttonRB

buttonRB: number

Gets or sets value of Right button

buttonRightStick

buttonRightStick: number

Gets or sets value of right stick

buttonStart

buttonStart: number

Gets or sets value of Start button

buttonX

buttonX: number

Gets or sets value of X button

buttonY

buttonY: number

Gets or sets value of Y button

dPadDown

dPadDown: number

Gets or sets value of DPad down

dPadLeft

dPadLeft: number

Gets or sets value of DPad left

dPadRight

dPadRight: number

Gets or sets value of DPad right

dPadUp

dPadUp: number

Gets or sets value of DPad up

id

id: string

index

index: number

isConnected

isConnected: boolean

leftStick

leftStick: StickValues

leftTrigger

leftTrigger: number

Gets or sets left trigger value

onButtonDownObservable

onButtonDownObservable: Observable<Xbox360Button>

Observable raised when a button is pressed

onButtonUpObservable

onButtonUpObservable: Observable<Xbox360Button>

Observable raised when a button is released

onPadDownObservable

onPadDownObservable: Observable<Xbox360Dpad>

Observable raised when a pad is pressed

onPadUpObservable

onPadUpObservable: Observable<Xbox360Dpad>

Observable raised when a pad is released

rightStick

rightStick: StickValues

rightTrigger

rightTrigger: number

Gets or sets right trigger value

type

type: number

Static GAMEPAD

GAMEPAD: number

Static GENERIC

GENERIC: number

Static POSE_ENABLED

POSE_ENABLED: number

Static XBOX

XBOX: number

Methods

dispose

  • dispose(): void

onbuttondown

  • onbuttondown(callback: function): void
  • Defines the callback to call when a button is pressed

    Parameters

    • callback: function

      defines the callback to use

    Returns void

onbuttonup

  • onbuttonup(callback: function): void
  • Defines the callback to call when a button is released

    Parameters

    • callback: function

      defines the callback to use

    Returns void

ondpaddown

  • ondpaddown(callback: function): void
  • Defines the callback to call when a pad is pressed

    Parameters

    • callback: function

      defines the callback to use

    Returns void

ondpadup

  • ondpadup(callback: function): void
  • Defines the callback to call when a pad is released

    Parameters

    • callback: function

      defines the callback to use

    Returns void

onleftstickchanged

  • onleftstickchanged(callback: function): void

onlefttriggerchanged

  • onlefttriggerchanged(callback: function): void
  • Defines the callback to call when left trigger is pressed

    Parameters

    • callback: function

      defines the callback to use

        • (value: number): void
        • Parameters

          • value: number

          Returns void

    Returns void

onrightstickchanged

  • onrightstickchanged(callback: function): void

onrighttriggerchanged

  • onrighttriggerchanged(callback: function): void
  • Defines the callback to call when right trigger is pressed

    Parameters

    • callback: function

      defines the callback to use

        • (value: number): void
        • Parameters

          • value: number

          Returns void

    Returns void

update

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

    Returns void

Generated using TypeDoc