Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Florian Bösch
On Sat, Aug 4, 2012 at 3:11 AM, Glenn Maynard gl...@zewt.org wrote: On a quick test, Firefox is firing mousemove events at 120Hz; this is about the same magnitude of data. We don't currently have any infrastructure for using ArrayBuffers for complex data, so it'd either need to be something

Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Florian Bösch
On Sat, Aug 4, 2012 at 11:07 AM, b...@pettay.fi b...@pettay.fi wrote: The update rate depends on the device. Tablet updates reach way beyond 120HZ and even my 3D mouse clocks in at about 500 events/s. And a major obstacle for a realtime input device is when the realtime app trying to use it

Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Olli Pettay
On 08/04/2012 12:16 PM, Florian Bösch wrote: On Sat, Aug 4, 2012 at 11:07 AM, b...@pettay.fi mailto:b...@pettay.fi b...@pettay.fi mailto:b...@pettay.fi wrote: The update rate depends on the device. Tablet updates reach way beyond 120HZ and even my 3D mouse clocks in at about 500

Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Florian Bösch
On Sat, Aug 4, 2012 at 11:24 AM, Olli Pettay olli.pet...@helsinki.fiwrote: It doesn't matter if they're bugs (I often see them in conjunction to array buffer allocation). Of course it matters. APIs shouldn't be designed based on implementation bugs It doesn't because those bugs have not

Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Florian Bösch
On Sat, Aug 4, 2012 at 11:31 AM, Florian Bösch pya...@gmail.com wrote: On Sat, Aug 4, 2012 at 11:24 AM, Olli Pettay olli.pet...@helsinki.fiwrote: It doesn't matter if they're bugs (I often see them in conjunction to array buffer allocation). Of course it matters. APIs shouldn't be designed

Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Florian Bösch
On Sat, Aug 4, 2012 at 11:46 AM, Florian Bösch pya...@gmail.com wrote: It's OK because the other half these projects owe it to array buffers to make things run blazing fast, since the JIT in V8 enthusiastically optimizes JS, the reduced pointer indirection speeds things up and the better

Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Glenn Maynard
Here's a rough sketch of an API that provides clean forwards-compatibility for devices. I think this also avoids all of the issues I talked about earlier: it gives a clean, easy to use event-based API that preserves ordering and timestamps; it can be used in both an event-based and polling way;

Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Florian Bösch
On Sat, Aug 4, 2012 at 7:03 PM, Glenn Maynard gl...@zewt.org wrote: Here's a rough sketch of an API that provides clean forwards-compatibility for devices. I think this also avoids all of the issues I talked about earlier: it gives a clean, easy to use event-based API that preserves ordering

Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Florian Bösch
On Sat, Aug 4, 2012 at 7:10 PM, Florian Bösch pya...@gmail.com wrote: What happens if there is no supported profile? Oh nm, then it's raw, stupid question.

Re: GamepadObserver (ie. MutationObserver + Gamepad)

2012-08-04 Thread Florian Bösch
On Sat, Aug 4, 2012 at 7:03 PM, Glenn Maynard gl...@zewt.org wrote: I haven't tried to incorporate Florian's suggestion of using something like ArrayBuffer. That could be supported later, eg. by providing a readIntoBuffer(buffer) next to read(). That's too complex to try to tackle all at