Gamepad properties

Internet Explorer Developer Channel introduces support for gamepad devices, as specified by the W3C Gamepad specification. Here are the properties supported by the Gamepad API.

In this section

TopicDescription

angularAcceleration

The angularAcceleration property represents the angular acceleration of the gamepad measured in meters per second.

angularVelocity

The angularVelocity property represents the angular velocity of the gamepad measured in meters per second.

axes

Array of current axis values supported by the gamepad device.

buttons

Array of states for the buttons supported by the gamepad device.

connected

Indicates whether the gamepad device is connected.

displayId

The displayId property returns the VRDisplay that is associated with this Gamepad object.

gamepad

Description the state of the gamepad device buttons and axes when the event was fired.

hand

The hand property specifies the hand that the controller is held in or is most likely to be held in.

hapticActuators

The hapticActuators property returns an array of all the haptic actuators in the gamepad.

hasOrientation

The hasOrientation property returns whether the gamepad is capable of tracking its orientation.

hasPosition

The hasPosition property returns whether the gamepad is capable of tracking its position.

id

Description of the gamepad device as reported by the underlying driver.

index

The index position of the Gamepad object in the array reported by the navigator.getGamepads function.

linearAcceleration

The linearAcceleration property represents the linear acceleration of the gamepad measured in meters per second.

linearVelocity

The linearVelocity property represents the linear velocity of the gamepad measured in meters per second.

mapping

A string representing the current configuration (mapping) of the controls on the gamepad device.

orientation

The orientation property represents the orientation of the gamepad as a quaternion.

pose

The pose property returns the current pose of the gamepad.

position

The position property of the gamepad as a 3D vector, given in meters from an origin point.

pressed

Indicates whether a gamepad button is pressed.

timestamp

A value representing the time the Gamepad object was recorded.

touched

The touched property returns the touched state of a button.

type

The type property determines the force applied for a given value in the pulse method.

value

Returns a numeric value representing the state of the button.

 

 

 

Show: