Re: [w3c/gamepad] Added touched property to GamepadButton (#26)

> There still exists some ambiguity over which button is associated with which axes, but that's a pre-existing problem and this addition doesn't make it any worse. This also ignores multi-touch surfaces (The PS4 controller has one) but considering the large amount of effort that has gone into supporting multi-touch for mobile devices it seems like that's not something we want to duplicate into the gamepad API.

Let me preface this by saying I'm extremely pleased with the tremendous work you've done and progress you've made with your Chromium builds. And I'm glad we have browser builds today to prototype HTC Vive motion controller support with WebVR.

That aside, perhaps it's premature to introduce `GamepadButton#touched` without consideration of multitouch.

(And, apologies for the radio silence on the [mailing list thread](https://lists.w3.org/Archives/Public/public-webapps/2016AprJun/0052.html); I had a lengthy draft I never got around to sending. So thanks for bringing it up again.)

We want to know the pressure in addition to the location and distance moved of the X and Y axes. As @patrickhlauke [brought up in the mailing list thread](https://lists.w3.org/Archives/Public/public-webapps/2016AprJun/0057.html), [Pointer Events](https://www.w3.org/TR/pointerevents/) are likely a good candidate for representing the touch data from controllers.

IMO, instead of overloading `GamepadButton`, perhaps we should introduce a `GamepadAxis` interface (per my comment [here](https://lists.w3.org/Archives/Public/public-webapps/2016AprJun/0056.html)).

But this begs the question: should we continue designing an API for accessing gamepad data on the Web that diverges from native controller APIs (that I'm aware of at least)?

In particular, the [SDL2 GameController API](https://wiki.libsdl.org/CategoryGameController) already supports multitouch events, [haptic feedback](https://wiki.libsdl.org/CategoryForceFeedback) (with support for controllers with multiple haptic motors; this goes beyond the `Gamepad#vibrate(pattern)` in the current Chromium WebVR builds), and [controller mappings](https://wiki.libsdl.org/SDL_GameControllerMapping). These are all items missing from the Gamepad API spec but supported well by SDL2 APIs.

There's been a [Bugzilla bug on file for this](https://bugzilla.mozilla.org/show_bug.cgi?id=855364) for some time now. And I filed an issue about SDL2 (#24), wherein we can continue the discussion. And many of the associated issues about the current API's limitations are already filed as well: #19, #24, #7, #6, #4.

Anyway, I wanted to bring this up before we introduce too many new properties or overload the existing interfaces. Thanks!


---
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/pull/26#issuecomment-226264505

Received on Wednesday, 15 June 2016 17:46:31 UTC