Re: PSA: publishing new WD of Gamepad on April 14

2015-04-13 Thread Ted Mielczarek
On Thu, Apr 9, 2015 at 5:15 PM, Ashley Gullen ash...@scirra.com wrote: Why doesn't the Gamepad API fire events for button pushes or axis movements? For example when pressing a mouse button or moving the mouse the browser fires mousedown and mousemove. The Gamepad API however requires you to

Re: PSA: publishing new WD of Gamepad on April 14

2015-04-10 Thread Florian Bösch
In principle I'm all for events on buttons, but here comes an additional complication :). Sometimes buttons are axes. They can be legitimate axes, like the triggers on gamepads, or incidential axes, like every button on some weird steering wheel I got. They can also be recognized as buttons by

Re: PSA: publishing new WD of Gamepad on April 14

2015-04-09 Thread Florian Bösch
The polling model for axes has a significant advantage as I'll illustrate. Suppose you're steering a cursor of some kind in 2 dimensions. That cursor would also draw a trail/line whatever. Here's what happens if you apply this logic on events per axis: You get a staircase. Why? Because the X-axis

Re: PSA: publishing new WD of Gamepad on April 14

2015-04-09 Thread Ashley Gullen
Why doesn't the Gamepad API fire events for button pushes or axis movements? For example when pressing a mouse button or moving the mouse the browser fires mousedown and mousemove. The Gamepad API however requires you to passively poll the state regularly (probably in rAF) and look for changes

PSA: publishing new WD of Gamepad on April 14

2015-04-09 Thread Arthur Barstow
Hi All, A new Working Draft publication of Gamepad is planned for April 14 using the following version as the basis: https://w3c.github.io/gamepad/publish/gamepad.html If anyone has any major concerns about this, please reply right away. A few notes about this spec: * This spec is now

[gamepad] UA applied mapping cannot be escaped [Was: Re: PSA: publishing new WD of Gamepad on April 14]

2015-04-09 Thread Arthur Barstow
On 4/9/15 8:28 AM, Florian Bösch wrote: If my reading is correct, there is no provision to escape a mapping that the UA would apply? I've observed in the past that the mappings can go quite awry. Would it be possible to offer a way toggle off mapping on a gamepad? Hi Florian - I was about to