File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/common/protocol/input Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,18 @@ interface BaseGamepadEvent<Control extends string> extends BaseInputEvent<'gamep
5252 /**
5353 * The (control-specific) index of the control.
5454 *
55- * This corresponds to the standard layout specified in
55+ * Buttons correspond to the standard layout specified in
5656 * https://www.w3.org/TR/gamepad/#dfn-standard-gamepad.
57+ *
58+ * Axes are mapped slightly differently:
59+ *
60+ * | Web API Standard Gamepad | This API |
61+ * | --------------------------- | -------------- |
62+ * | Axis 0 (left stick x-axis) | Axis2D 0 |
63+ * | Axis 1 (left stick y-axis) | Axis2D 0 |
64+ * | Axis 2 (right stick x-axis) | Axis2D 1 |
65+ * | Axis 3 (right stick y-axis) | Axis2D 1 |
66+ * | Axis n (for n >= 4) | Axis (n - 4) |
5767 */
5868 index : number ;
5969}
You can’t perform that action at this time.
0 commit comments