diff --git a/extensions.html b/extensions.html index c91d6aa..cc34b99 100644 --- a/extensions.html +++ b/extensions.html @@ -334,6 +334,116 @@

GamepadPose Interface

+ +
+

GamepadLightIndicatorType Enum

+

+ This enum defines the type of light indicators supported by gamepads. +

+ +
+        enum GamepadLightIndicatorType {
+          "on-off",
+          "rgb"
+        };
+      
+ +
+
"on-off"
+
+ Light indicator that supports a single color. +
+ +
"rgb"
+
+ Light indicator that supports multiple colors. +
+
+
+ +
+

GamepadLightColor dictionary

+

+ This represents the color of a light indicator. +

+ +
+        dictionary GamepadLightColor {
+          octet red = 0;
+          octet green = 0;
+          octet blue = 0;
+       };
+      
+ +
+
red
member +
+ Red component of the light color, or non-zero value for an + on-off light indicator that indicates ON. +
+ +
green
member +
+ Blue component of the light color, or non-zero value for an + on-off light indicator that indicates ON. +
+ +
blue
member +
+ Green component of the light color, or non-zero value for an + on-off light indicator that indicates ON. +
+
+
+ +
+

GamepadLightIndicator

+

+ This interface defines a light indicator. +

+ +
+        [Exposed=Window, SecureContext]
+        interface GamepadLightIndicator {
+          readonly attribute GamepadLightIndicatorType type;
+        
+          Promise<undefined> setColor(GamepadLightColor color);
+      };
+      
+ +
+
type
+
+ Type of light indicator supported by the gamepad. +
+ +
setColor()
method +
+

+ Sets the color of a light indicator, or sets the light indicator to ON + or OFF. +

+ +

+ For on-off light indicators, one or more non zero values + denotes the light indicator is on, whereas a zero value for all + components indicates the light indicator is off. +

+ +

+ For RGB light indicators, one or more non zero values specify the + color of the light indicator, whereas all zero values indicate the + light indicator is OFF. +

+ +

+ The returned Promise will resolve true when setting the + color has succeeded, and will reject the device API error code on + failure. +

+
+
+

GamepadTouch Interface

@@ -397,6 +507,7 @@

Partial Gamepad Interface

readonly attribute GamepadHand hand; readonly attribute FrozenArray<GamepadHapticActuator> hapticActuators; readonly attribute GamepadPose? pose; + readonly attribute FrozenArray<GamepadLightIndicator> lightIndicators; readonly attribute FrozenArray<GamepadTouch>? touchEvents; }; @@ -423,6 +534,11 @@

Partial Gamepad Interface

null. +
lightIndicators
+
+ A list of all light indicators in the gamepad. The array is empty if + the gamepad does not have, or does not support, a light indicator. +
touchEvents
A list of touch events generated from all touch surfaces. null