Re: [Gamepad] Liveness of Gamepad objects

On Tue, Apr 29, 2014 at 6:42 PM, Brandon Jones <bajones@google.com> wrote:

> On Tue Apr 29 2014 at 4:28:31 PM, Glenn Maynard <glenn@zewt.org> wrote:
>
>> (That said, I'm confused--where's the event to tell the user that the
>> gamepad has changed?  Surely this API doesn't require the developer to
>> poll, which would lose inputs at the slightest GC skip and could never give
>> high resolution timing.)
>>
>
> This is slightly off topic, but worth addressing. The spec does not, in
> fact, have any change notifications. Firefox has some experimental ones you
> can enable but they're not official. This does indeed provide an
> opportunity for input loss, but I'm not aware of anyone who's actually
> found it to be a problem. (Given the sparse number of apps using the API,
> though, that doesn't say much.)
>

Using snapshots makes it easier to add this later, even if it's not done
right away, since you just stash a snapshot in each event when you create
it.

I think not having change events assumed that everyone using gamepads will
have a requestAnimationFrame loop running, but not everything that might
use gamepads is a game.  Regular web pages can also use gamepads, eg. for
navigating menus.

-- 
Glenn Maynard

Received on Tuesday, 29 April 2014 23:58:31 UTC