Re: gamepad property on events?

On Tue, Oct 4, 2011 at 9:59 AM, Ted Mielczarek <ted@mielczarek.org> wrote:

> While finishing up my prototype Gamepad API implementation for Gecko,
> I realized that the way I've implemented something no longer makes
> much sense. We've discussed exposing the set of connected gamepads on
> a "navigator.gamepads[]" property (the exact location is not important
> at the moment). Currently in what I've implemented, each gamepad DOM
> event has a ".gamepad" property containing a DOMGamepad object with
> the full state of the device. However, if there's a
> navigator.gamepads, does it make more sense to instead simply have a
> ".index" property on the events, which indexes into
> navigator.gamepads?
>

I think getting a gamepad object in the event is probably easier to
understand, rather than getting an index that has to be combined with
gamepads[]. I would expect it to be the same object as is in the gamepads
array though.

Received on Wednesday, 5 October 2011 14:53:54 UTC