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

Thanks for the comments @cvan! A couple of things I wanted to point out in response:

> We want to know the pressure in addition to the location and distance moved of the X and Y axes.

I feel like the button `value` handles this appropriately right now. I can't think of any situation in which you'd have a separate touch pressure and pressed value on the same input.

> Pointer Events are likely a good candidate for representing the touch data from controllers.

I agree! Especially for multitouch inputs, it feels like we'd need a much deeper level of API support than we likely want to add to the Gamepad API. I'm hesitant to say that _all_ touch inputs need to use a separate API like that, though. It doesn't feel appropriate to route the Vive's touchpad through PointerEvents, for example. All we really need in that case is a way to disambiguate the [0, 0] case and the rest works as-is. 

> IMO, instead of overloading GamepadButton, perhaps we should introduce a GamepadAxis interface (per my comment here).

I assume that would be used in place of floats in the `axes` array? If so I'm really reluctant to do so, since that would be a significant breaking change. Adding `touched` to button doesn't require any existing code to change and can safely be ignored by devs who don't care about the property. I'l also point out that while the Steam/Vive controllers have a convention of associating vibration with axes (because they actually vibrate the touch pads) that doesn't apply to all devices. I don't think it's a good idea to associate axis data with vibration.

I'll also point out that I haven't submitted a pull request for any haptics support, because it's the part of the experimental builds that I'm least happy with. After toying with my original API I definitely think we can do better than a simple pulse pattern for the entire gamepad, and would love to discuss that side of things further! Probably a better conversation for an issue like #19 though.


---
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-226277270

Received on Wednesday, 15 June 2016 18:28:48 UTC