Re: [w3c/gamepad] Clarifications for getGamepads (#72)

For a):

> If a gamepad is disconnected, previously assigned indices MUST NOT be reassigned to gamepads that continue to be connected. 

A gamepad should preserve its index in the array returned by getGamepads. Suppose the user connects an Xbox 360 gamepad over USB, then pairs a DS4 over Bluetooth, then unplugs the Xbox 360 gamepad. If getGamepads tried to avoid leaving a null element in the array, it means that any page using gamepad input would need to move the DS4 from slot 1 to slot 0.  If the connected gamepad's slot has meaning in the application (eg, different gamepads correspond to different players), switching the slot unexpectedly could cause confusion and frustration.

For b), I think the spec should be clarified. In my opinion, the "interacted-with" bit should only be set if the interaction is significant (it should not be triggered when an analog gamepad is gently set onto a table or if a button is lightly touched) and should persist at the very least across a refresh but definitely not across origins. Button.pressed is probably too sensitive to be used as an "interacted-with" signal since it can fire if an analog trigger is lightly pulled.

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

Received on Friday, 1 June 2018 20:17:46 UTC