GamepadButton object

GamepadButton objects describe the state of a button on the gamepad device. Use the buttons property to retrieve an array of GamepadButton objects representing the buttons supported by the Gamepad device.

Syntax


var aButtons = gamepad.buttons;

DOM Information

Inheritance Hierarchy

The GamepadButton does not inherit from any class or interface.

Members

The GamepadButton object has these types of members:

Properties

The GamepadButton object has these properties.

PropertyAccess typeDescription

pressed

Read-only

Indicates whether a gamepad button is pressed.

touched

Read-only

The touched property returns the touched state of a button.

value

Read-only

Returns a numeric value representing the state of the button.

 

 

 

Show: