Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamepad trigger-rumble and associated updates #34442

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Next Next commit
Gamepad trigger-rumble and associated updates
  • Loading branch information
chrisdavidmills committed Jun 27, 2024
commit 35d16e4fddc8d581ec090b196953cc634f67b7d5
4 changes: 3 additions & 1 deletion files/en-us/web/api/gamepadhapticactuator/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ This interface is accessible through the {{domxref("Gamepad.hapticActuators")}}
## Instance properties

- {{domxref("GamepadHapticActuator.type")}} {{ReadOnlyInline}}
- : Returns an enum representing the type of the haptic hardware.
- : Returns an enumerated value representing the type of the haptic hardware.
- {{domxref("GamepadHapticActuator.effects")}} {{ReadOnlyInline}}
- : Returns an array of enumerated values representing the different haptic effects that the actuator supports.

## Instance methods

Expand Down
9 changes: 6 additions & 3 deletions files/en-us/web/api/gamepadhapticactuator/type/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ browser-compat: api.GamepadHapticActuator.type

{{APIRef("Gamepad")}}

The **`type`** read-only property of the {{domxref("GamepadHapticActuator")}} interface returns an enum representing the type of the haptic hardware.
The **`type`** read-only property of the {{domxref("GamepadHapticActuator")}} interface returns an enumerated value representing the type of the haptic hardware.

## Value

An enum of type [`GamepadHapticActuatorType`](https://w3c.github.io/gamepad/extensions.html#gamepadhapticactuatortype-enum); currently available types are:
An enumerated value representing the haptic hardware type. Currently available types are:

- `vibration` — vibration hardware, which creates a rumbling effect.
- `dual-rumble`
- : vibration hardware, which creates a rumbling effect.
- `trigger-rumble`
- : vibration hardware, which creates a rumbling effect.

## Examples

Expand Down
7 changes: 6 additions & 1 deletion files/jsondata/GroupData.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,12 @@
"/docs/Web/API/Gamepad_API/Using_the_Gamepad_API",
"/docs/Games/Techniques/Controls_Gamepad_API"
],
"interfaces": ["Gamepad", "GamepadButton", "GamepadEvent"],
"interfaces": [
"Gamepad",
"GamepadButton",
"GamepadEvent",
"GamepadHapticActuator"
],
"methods": ["Navigator.getGamepads()"],
"properties": [],
"events": ["Window: gamepadconnected", "Window: gamepaddisconnected"]
Expand Down