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

Re: [Gamepad] Liveness of Gamepad objects

From: Rick Waldron <waldron.rick@gmail.com>
Date: Tue, 29 Apr 2014 21:38:55 -0400
Message-ID: <CAHfnhfrGHS2780na2P9T2gs0foi0skGW87bBPcWOqgLxdMMMBg@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: Florian Bösch <pyalot@gmail.com>, "Mark S. Miller" <erights@google.com>, Boris Zbarsky <bzbarsky@mit.edu>, Brandon Jones <bajones@google.com>, Brendan Eich <brendan@secure.meer.net>, public-webapps <public-webapps@w3.org>
On Tue, Apr 29, 2014 at 7:28 PM, Glenn Maynard <glenn@zewt.org> wrote:

> Gamepad objects should definitely be a snapshot.  Otherwise, change events
> could only expose the most recent state of the gamepad.  For example, if
> the user presses a button and then releases it very quickly (before the
> down press gets handled by script), and you fire two change events, the
> script would never see the buttons as pressed.

The previously node-dualshock-controller API, emits "change" events from
the "live" object. The "change" event delivers the state of the actual
change. A user might "quickly" press button "A" and the listener for "A"
does whatever updating it must do in the program and has access to both the
"change state" and the current "live state" of the object.

Received on Wednesday, 30 April 2014 01:39:55 UTC

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