Gamepad

@JSType
trait Gamepad extends Any

Represents the state of a connected gamepad device.

trait Any
class Object
trait Matchable
class Any

Value members

Abstract fields

@ExposedJSMember
val axes: Array[Double]

An array containing the state of all of the gamepad's axes, from -1 .. 1.

An array containing the state of all of the gamepad's axes, from -1 .. 1.

@ExposedJSMember

The current state of all the gamepad's buttons.

The current state of all the gamepad's buttons.

@ExposedJSMember
val connected: Boolean

True if this gamepad is currently connected.

True if this gamepad is currently connected.

@ExposedJSMember
val id: String

The identification string for the gamepad.

The identification string for the gamepad.

@ExposedJSMember
val index: Double

The index of the gamepad as returned by Navigator.getGamepads

The index of the gamepad as returned by Navigator.getGamepads

@ExposedJSMember

The layout of the gamepad. Either "standard" or unknown ("").

The layout of the gamepad. Either "standard" or unknown ("").

@ExposedJSMember
val timestamp: Double

Last time the data for this gamepad was updated.

Last time the data for this gamepad was updated.