From cfde27755fdb2ec8746123bf7f8adaefbaaf173a Mon Sep 17 00:00:00 2001 From: "Queen Vinyl Da.i'gyu-Kazotetsu" Date: Tue, 24 Sep 2024 17:47:56 -0700 Subject: [PATCH 1/5] Add features for Gamepad API --- features/gamepad-extensions.yml | 23 ++++++++ features/gamepad-extensions.yml.dist | 46 +++++++++++++++ features/gamepad-haptics.yml | 16 ++++++ features/gamepad-haptics.yml.dist | 49 ++++++++++++++++ features/gamepad.yml | 26 +++++++++ features/gamepad.yml.dist | 85 ++++++++++++++++++++++++++++ groups/gamepad.yml | 1 + 7 files changed, 246 insertions(+) create mode 100644 features/gamepad-extensions.yml create mode 100644 features/gamepad-extensions.yml.dist create mode 100644 features/gamepad-haptics.yml create mode 100644 features/gamepad-haptics.yml.dist create mode 100644 features/gamepad.yml create mode 100644 features/gamepad.yml.dist create mode 100644 groups/gamepad.yml diff --git a/features/gamepad-extensions.yml b/features/gamepad-extensions.yml new file mode 100644 index 00000000000..78224cc7d26 --- /dev/null +++ b/features/gamepad-extensions.yml @@ -0,0 +1,23 @@ +name: gamepad +description: The Gamepad Extensions API allows developers to seamlessly interface with gamepad-like devices with advanced capabilities, such as controllers for XR headsets. +spec: https://w3c.github.io/gamepad/extensions.html +group: gamepad +status: + compute_from: api.GamepadPose +compat_features: + - api.Gamepad.displayId + - 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 diff --git a/features/gamepad-extensions.yml.dist b/features/gamepad-extensions.yml.dist new file mode 100644 index 00000000000..d91ce5f327b --- /dev/null +++ b/features/gamepad-extensions.yml.dist @@ -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 diff --git a/features/gamepad-haptics.yml b/features/gamepad-haptics.yml new file mode 100644 index 00000000000..a2d8a3c657c --- /dev/null +++ b/features/gamepad-haptics.yml @@ -0,0 +1,16 @@ +name: gamepad-haptics +description: The gamepad haptics interfaces allow developers to control the vibration motors in gamepads. +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 diff --git a/features/gamepad-haptics.yml.dist b/features/gamepad-haptics.yml.dist new file mode 100644 index 00000000000..2fc420683cb --- /dev/null +++ b/features/gamepad-haptics.yml.dist @@ -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 diff --git a/features/gamepad.yml b/features/gamepad.yml new file mode 100644 index 00000000000..83b0933305b --- /dev/null +++ b/features/gamepad.yml @@ -0,0 +1,26 @@ +name: gamepad +description: The Gamepad API allows developers to seamlessly interface with game controllers in web apps. +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 + - api.GamepadButton.value + - api.Navigator.getGamepads + - api.GamepadEvent + - api.GamepadEvent.GamepadEvent + - api.GamepadEvent.gamepad + - api.Window.gamepadconnected_event + - api.Window.gamepaddisconnected_event diff --git a/features/gamepad.yml.dist b/features/gamepad.yml.dist new file mode 100644 index 00000000000..9b9659a1d14 --- /dev/null +++ b/features/gamepad.yml.dist @@ -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 diff --git a/groups/gamepad.yml b/groups/gamepad.yml new file mode 100644 index 00000000000..82013df8157 --- /dev/null +++ b/groups/gamepad.yml @@ -0,0 +1 @@ +name: Gamepad From 839b52c101929801849e20f063f030cf9686ce65 Mon Sep 17 00:00:00 2001 From: "Queen Vinyl Da.i'gyu-Kazotetsu" Date: Tue, 24 Sep 2024 18:38:29 -0700 Subject: [PATCH 2/5] Fix spec URL --- features/gamepad.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/gamepad.yml b/features/gamepad.yml index 83b0933305b..45f2a93a05e 100644 --- a/features/gamepad.yml +++ b/features/gamepad.yml @@ -1,6 +1,6 @@ name: gamepad description: The Gamepad API allows developers to seamlessly interface with game controllers in web apps. -spec: https://w3c.github.io/gamepad +spec: https://w3c.github.io/gamepad/ caniuse: gamepad group: gamepad status: From f8fc46e6d5c3f96daf903b2fd525ae61ccda32ff Mon Sep 17 00:00:00 2001 From: "Queen Vinyl Da.i'gyu-Kazotetsu" Date: Wed, 25 Sep 2024 08:24:12 -0700 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Patrick Brosset --- features/gamepad-extensions.yml | 2 +- features/gamepad-haptics.yml | 4 ++-- features/gamepad.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/features/gamepad-extensions.yml b/features/gamepad-extensions.yml index 78224cc7d26..baa190aeff5 100644 --- a/features/gamepad-extensions.yml +++ b/features/gamepad-extensions.yml @@ -1,4 +1,4 @@ -name: gamepad +name: Gamepad extensions description: The Gamepad Extensions API allows developers to seamlessly interface with gamepad-like devices with advanced capabilities, such as controllers for XR headsets. spec: https://w3c.github.io/gamepad/extensions.html group: gamepad diff --git a/features/gamepad-haptics.yml b/features/gamepad-haptics.yml index a2d8a3c657c..c8f4907d174 100644 --- a/features/gamepad-haptics.yml +++ b/features/gamepad-haptics.yml @@ -1,5 +1,5 @@ -name: gamepad-haptics -description: The gamepad haptics interfaces allow developers to control the vibration motors in gamepads. +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: diff --git a/features/gamepad.yml b/features/gamepad.yml index 45f2a93a05e..e8798dbc037 100644 --- a/features/gamepad.yml +++ b/features/gamepad.yml @@ -1,5 +1,5 @@ -name: gamepad -description: The Gamepad API allows developers to seamlessly interface with game controllers in web apps. +name: Gamepad +description: The Gamepad API accesses and responds to signals from game controllers in web pages. spec: https://w3c.github.io/gamepad/ caniuse: gamepad group: gamepad From ded5869261f8cd57ed4f8b7f8cb8cab285f2759b Mon Sep 17 00:00:00 2001 From: "Queen Vinyl Da.i'gyu-Kazotetsu" Date: Fri, 25 Oct 2024 16:07:28 -0700 Subject: [PATCH 4/5] Update features/gamepad-extensions.yml Co-authored-by: Patrick Brosset --- features/gamepad-extensions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/gamepad-extensions.yml b/features/gamepad-extensions.yml index baa190aeff5..4dec0b5f4e5 100644 --- a/features/gamepad-extensions.yml +++ b/features/gamepad-extensions.yml @@ -1,5 +1,5 @@ name: Gamepad extensions -description: The Gamepad Extensions API allows developers to seamlessly interface with gamepad-like devices with advanced capabilities, such as controllers for XR headsets. +description: The `gamepad.hand` and `gamepad.pose` properties of the Gamepad API represent the position in space and the hand that WebXR controllers are being held in. spec: https://w3c.github.io/gamepad/extensions.html group: gamepad status: From 523a1847e3e8381ba4009fd57ed90507807d6f0c Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Thu, 12 Dec 2024 11:35:47 +0100 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Daniel D. Beck --- features/gamepad-extensions.yml | 2 +- features/gamepad.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/gamepad-extensions.yml b/features/gamepad-extensions.yml index 4dec0b5f4e5..b1bb296061a 100644 --- a/features/gamepad-extensions.yml +++ b/features/gamepad-extensions.yml @@ -1,5 +1,5 @@ name: Gamepad extensions -description: The `gamepad.hand` and `gamepad.pose` properties of the Gamepad API represent the position in space and the hand that WebXR controllers are being held in. +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: diff --git a/features/gamepad.yml b/features/gamepad.yml index e8798dbc037..5c5cb0cabe7 100644 --- a/features/gamepad.yml +++ b/features/gamepad.yml @@ -1,5 +1,5 @@ name: Gamepad -description: The Gamepad API accesses and responds to signals from game controllers in web pages. +description: The `Gamepad` API accesses and responds to signals from game controllers. spec: https://w3c.github.io/gamepad/ caniuse: gamepad group: gamepad