Re: [w3c/gamepad] Add -1 to the set of allowed indices (PR #158)

Gamepad API has been rewritten to use algorithms in the time since the WebXR issue was filed. Now there are algorithmic steps for [selecting a gamepad index](https://w3c.github.io/gamepad/#dfn-selecting-an-unused-gamepad-index) and [constructing a Gamepad](https://w3c.github.io/gamepad/#constructing-a-gamepad), but these steps assume we're connecting a "traditional gamepad" (as WebXR describes it) and should not be used to initialize XR gamepads. WebXR should define new steps for constructing a Gamepad from an XR input source.

Since the requirements in the "index attribute" description are already defined in the algorithm for initializing the attribute, let's remove the duplicate information so the description is correct regardless of how the attribute is initialized. Maybe just the first sentence is okay?

    The index of the gamepad in the {{Navigator}}, if it is exposed via {{Navigator/getGamepads()}}.

Actually, this is incorrect since a Gamepad object retains its index after it's disconnected and no longer exposed by getGamepads(). Let's keep it simple and let the algorithms define what the behavior is. If we need to add more information, put it in a non-normative block.

    The index of the gamepad.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/158#issuecomment-1002817675
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/pull/158/c1002817675@github.com>

Received on Wednesday, 29 December 2021 23:58:31 UTC