-
Notifications
You must be signed in to change notification settings - Fork 199
Add features for Gamepad API #1835
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
Changes from all commits
cfde277
839b52c
f8fc46e
ded5869
523a184
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Gamepad extensions | ||
| description: The `hand` and `pose` properties of a `Gamepad` object represent the position in space and the hand that WebXR controllers are held in. | ||
| spec: https://w3c.github.io/gamepad/extensions.html | ||
| group: gamepad | ||
| status: | ||
| compute_from: api.GamepadPose | ||
| compat_features: | ||
| - api.Gamepad.displayId | ||
Elchi3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - api.Gamepad.hand | ||
| - api.Gamepad.hapticActuators | ||
| - api.Gamepad.pose | ||
| - api.GamepadHapticActuator.canPlayEffectType | ||
| - api.GamepadHapticActuator.pulse | ||
| - api.GamepadHapticActuator.type | ||
| - api.GamepadPose | ||
| - api.GamepadPose.angularAcceleration | ||
| - api.GamepadPose.angularVelocity | ||
| - api.GamepadPose.hasOrientation | ||
| - api.GamepadPose.hasPosition | ||
| - api.GamepadPose.linearAcceleration | ||
| - api.GamepadPose.linearVelocity | ||
| - api.GamepadPose.orientation | ||
| - api.GamepadPose.position | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Generated from: gamepad-extensions.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: | ||
| firefox: "55" | ||
| firefox_android: "55" | ||
| compat_features: | ||
| # baseline: false | ||
| # support: | ||
| # chrome: "68" | ||
| # chrome_android: "68" | ||
| # edge: "15" | ||
| # firefox: "55" | ||
| # firefox_android: "55" | ||
| # safari: "16.4" | ||
| - api.GamepadHapticActuator.type | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: false | ||
| # support: | ||
| # firefox: "55" | ||
| # firefox_android: "55" | ||
| - api.Gamepad.hand | ||
| - api.Gamepad.hapticActuators | ||
| - api.Gamepad.pose | ||
| - api.GamepadHapticActuator.pulse | ||
| - api.GamepadPose | ||
| - api.GamepadPose.angularAcceleration | ||
| - api.GamepadPose.angularVelocity | ||
| - api.GamepadPose.hasOrientation | ||
| - api.GamepadPose.hasPosition | ||
| - api.GamepadPose.linearAcceleration | ||
| - api.GamepadPose.linearVelocity | ||
| - api.GamepadPose.orientation | ||
| - api.GamepadPose.position | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # safari: "16.4" | ||
| - api.GamepadHapticActuator.canPlayEffectType | ||
|
|
||
| # baseline: false | ||
| # support: {} | ||
| - api.Gamepad.displayId |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: Gamepad haptic feedback | ||
| description: The `gamepad.vibrationActuator` property represents a gamepad's haptics hardware, which allows you to control the vibration motors in a gamepad. | ||
| spec: https://w3c.github.io/gamepad/#gamepadhapticactuator-interface | ||
| group: gamepad | ||
| status: | ||
| compute_from: api.Gamepad.vibrationActuator | ||
| compat_features: | ||
| - api.Gamepad.vibrationActuator | ||
| - api.GamepadHapticActuator | ||
| - api.GamepadHapticActuator.effects | ||
| - api.GamepadHapticActuator.effects.type_trigger-rumble | ||
| - api.GamepadHapticActuator.playEffect | ||
| - api.GamepadHapticActuator.playEffect.params_leftTrigger_parameter | ||
| - api.GamepadHapticActuator.playEffect.params_rightTrigger_parameter | ||
| - api.GamepadHapticActuator.playEffect.type_trigger-rumble | ||
| - api.GamepadHapticActuator.reset |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Generated from: gamepad-haptics.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: | ||
| chrome: "68" | ||
| chrome_android: "68" | ||
| edge: "79" | ||
| safari: "16.4" | ||
| compat_features: | ||
| # baseline: false | ||
| # support: | ||
| # chrome: "68" | ||
| # chrome_android: "68" | ||
| # edge: "15" | ||
| # firefox: "55" | ||
| # firefox_android: "55" | ||
| # safari: "16.4" | ||
| - api.GamepadHapticActuator | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "68" | ||
| # chrome_android: "68" | ||
| # edge: "15" | ||
| # safari: "16.4" | ||
| - api.GamepadHapticActuator.playEffect | ||
| - api.GamepadHapticActuator.reset | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: false | ||
| # support: | ||
| # chrome: "68" | ||
| # chrome_android: "68" | ||
| # edge: "79" | ||
| # safari: "16.4" | ||
| - api.Gamepad.vibrationActuator | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "126" | ||
| # chrome_android: "126" | ||
| # edge: "126" | ||
| - api.GamepadHapticActuator.effects | ||
| - api.GamepadHapticActuator.effects.type_trigger-rumble | ||
| - api.GamepadHapticActuator.playEffect.params_leftTrigger_parameter | ||
| - api.GamepadHapticActuator.playEffect.params_rightTrigger_parameter | ||
| - api.GamepadHapticActuator.playEffect.type_trigger-rumble |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: Gamepad | ||
| description: The `Gamepad` API accesses and responds to signals from game controllers. | ||
| spec: https://w3c.github.io/gamepad/ | ||
| caniuse: gamepad | ||
| group: gamepad | ||
| status: | ||
| compute_from: api.Gamepad | ||
| compat_features: | ||
| - api.Gamepad | ||
| - api.Gamepad.axes | ||
| - api.Gamepad.buttons | ||
| - api.Gamepad.connected | ||
| - api.Gamepad.id | ||
| - api.Gamepad.index | ||
| - api.Gamepad.mapping | ||
| - api.Gamepad.timestamp | ||
| - api.GamepadButton | ||
| - api.GamepadButton.pressed | ||
| - api.GamepadButton.touched | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This event is not supported in Safari yet. It's worth doing one of these two things:
|
||
| - api.GamepadButton.value | ||
| - api.Navigator.getGamepads | ||
| - api.GamepadEvent | ||
| - api.GamepadEvent.GamepadEvent | ||
| - api.GamepadEvent.gamepad | ||
| - api.Window.gamepadconnected_event | ||
| - api.Window.gamepaddisconnected_event | ||
|
Comment on lines
+25
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for these 2 BCD keys. They're not baseline, but since you can use the Gamepad API without them, we should ask ourselves whether they make sense as a separate feature, or if we keep them silent in here. I'm not sure what to do here, because the tutorial on using the Gamepad API mentions those 2 events as essential to the feature: https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a weird case. The events work, but the (At one time, BCD recorded these separately, then combined them to make the data more consistent. Here we're getting bitten by this. The notes aren't structured, but they're rather consistent—it's possible we could introduce some logic to unwind the |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # Generated from: gamepad.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2017-03-27 | ||
| baseline_high_date: 2019-09-27 | ||
| support: | ||
| chrome: "21" | ||
| chrome_android: "25" | ||
| edge: "12" | ||
| firefox: "29" | ||
| firefox_android: "32" | ||
| safari: "10.1" | ||
| safari_ios: "10.3" | ||
| compat_features: | ||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: high | ||
| # baseline_low_date: 2017-03-27 | ||
| # baseline_high_date: 2019-09-27 | ||
| # support: | ||
| # chrome: "21" | ||
| # chrome_android: "25" | ||
| # edge: "12" | ||
| # firefox: "29" | ||
| # firefox_android: "32" | ||
| # safari: "10.1" | ||
| # safari_ios: "10.3" | ||
| - api.Gamepad | ||
| - api.Gamepad.axes | ||
| - api.Gamepad.buttons | ||
| - api.Gamepad.id | ||
| - api.Gamepad.index | ||
| - api.Gamepad.mapping | ||
| - api.Gamepad.timestamp | ||
| - api.GamepadButton | ||
| - api.GamepadButton.pressed | ||
| - api.GamepadButton.value | ||
| - api.GamepadEvent | ||
| - api.GamepadEvent.gamepad | ||
|
|
||
| # baseline: high | ||
| # baseline_low_date: 2017-03-27 | ||
| # baseline_high_date: 2019-09-27 | ||
| # support: | ||
| # chrome: "25" | ||
| # chrome_android: "25" | ||
| # edge: "12" | ||
| # firefox: "29" | ||
| # firefox_android: "32" | ||
| # safari: "10.1" | ||
| # safari_ios: "10.3" | ||
| - api.Gamepad.connected | ||
|
|
||
| # baseline: high | ||
| # baseline_low_date: 2017-03-27 | ||
| # baseline_high_date: 2019-09-27 | ||
| # support: | ||
| # chrome: "35" | ||
| # chrome_android: "35" | ||
| # edge: "12" | ||
| # firefox: "29" | ||
| # firefox_android: "32" | ||
| # safari: "10.1" | ||
| # safari_ios: "10.3" | ||
| - api.GamepadEvent.GamepadEvent | ||
| - api.Navigator.getGamepads | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "73" | ||
| # chrome_android: "73" | ||
| # edge: "15" | ||
| # firefox: "55" | ||
| # firefox_android: "55" | ||
| - api.GamepadButton.touched | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # firefox: "89" | ||
| # firefox_android: "89" | ||
| # safari: "16" | ||
| # safari_ios: "16" | ||
| - api.Window.gamepadconnected_event | ||
| - api.Window.gamepaddisconnected_event |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| name: Gamepad |
Uh oh!
There was an error while loading. Please reload this page.