W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

Re: [Gamepad] Liveness of Gamepad objects

From: Glenn Maynard <glenn@zewt.org>
Date: Tue, 29 Apr 2014 18:58:04 -0500
Message-ID: <CABirCh_86-2KXs-PKJhChDdYeH7UF6xVEkaD-caaHZRsH6xXOA@mail.gmail.com>
To: Brandon Jones <bajones@google.com>
Cc: Florian Bösch <pyalot@gmail.com>, Mark Miller <erights@google.com>, Boris Zbarsky <bzbarsky@mit.edu>, Brendan Eich <brendan@secure.meer.net>, public-webapps WG <public-webapps@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC