Xbox360Pad

Defines a XBox360 gamepad

Hierarchy

Index

Constructors

constructor

Find examples in Playground
  • 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

Find examples in Playground
browserGamepad: any

The browser gamepad

buttonA

Find examples in Playground
buttonA: number

Sets the value of the A button

buttonB

Find examples in Playground
buttonB: number

Sets the value of the B button

buttonBack

Find examples in Playground
buttonBack: number

Sets the value of the Back button

buttonLB

Find examples in Playground
buttonLB: number

Sets the value of the Left button

buttonLeftStick

Find examples in Playground
buttonLeftStick: number

Sets the value of the Left joystick

buttonRB

Find examples in Playground
buttonRB: number

Sets the value of the Right button

buttonRightStick

Find examples in Playground
buttonRightStick: number

Sets the value of the Right joystick

buttonStart

Find examples in Playground
buttonStart: number

Sets the value of the Start button

buttonX

Find examples in Playground
buttonX: number

Sets the value of the X button

buttonY

Find examples in Playground
buttonY: number

Sets the value of the Y button

dPadDown

Find examples in Playground
dPadDown: number

Sets the value of D-pad down

dPadLeft

Find examples in Playground
dPadLeft: number

Sets the value of D-pad left

dPadRight

Find examples in Playground
dPadRight: number

Sets the value of D-pad right

dPadUp

Find examples in Playground
dPadUp: number

Sets the value of D-pad up

id

Find examples in Playground
id: string

The id of the gamepad

index

Find examples in Playground
index: number

The index of the gamepad

isConnected

Find examples in Playground
isConnected: boolean

Specifies if the gamepad has been connected

leftStick

Find examples in Playground
leftStick: StickValues

Sets the left joystick values

leftTrigger

Find examples in Playground
leftTrigger: number

Sets the left trigger value

onButtonDownObservable

Find examples in Playground
onButtonDownObservable: Observable<Xbox360Button>

Observable raised when a button is pressed

onButtonUpObservable

Find examples in Playground
onButtonUpObservable: Observable<Xbox360Button>

Observable raised when a button is released

onPadDownObservable

Find examples in Playground
onPadDownObservable: Observable<Xbox360Dpad>

Observable raised when a pad is pressed

onPadUpObservable

Find examples in Playground
onPadUpObservable: Observable<Xbox360Dpad>

Observable raised when a pad is released

rightStick

Find examples in Playground
rightStick: StickValues

Sets the right joystick value

rightTrigger

Find examples in Playground
rightTrigger: number

Sets the right trigger value

type

Find examples in Playground
type: number

Specifies what type of gamepad this represents

Static GAMEPAD

Find examples in Playground
GAMEPAD: number

Represents a gamepad controller

Static GENERIC

Find examples in Playground
GENERIC: number

Represents a generic controller

Static POSE_ENABLED

Find examples in Playground
POSE_ENABLED: number

Represents a pose-enabled controller

Static XBOX

Find examples in Playground
XBOX: number

Represents an XBox controller

Methods

dispose

Find examples in Playground
  • dispose(): void

onbuttondown

Find examples in Playground
  • 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

Find examples in Playground
  • 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

Find examples in Playground
  • 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

Find examples in Playground
  • 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

Find examples in Playground
  • onleftstickchanged(callback: function): void

onlefttriggerchanged

Find examples in Playground
  • 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

Find examples in Playground
  • onrightstickchanged(callback: function): void

onrighttriggerchanged

Find examples in Playground
  • 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

Find examples in Playground
  • update(): void
  • Force the gamepad to synchronize with device values

    Returns void

Generated using TypeDoc