Re: [w3c/gamepad] Added a supplemental "Extensions" spec (#32)

I think duration and intensity pairs could easily be mapped to what ever an underlying API requires.  For example, if a haptic effect requires a buffer with a fixed timestep, the UA could "bake" a buffer using the duration-intensity pairs passed in.  In cases where the underlying hardware only accepts discrete updates of intensity, the UA could implement the loop that updates the intensity and run it asynchronously with more precise timing than possible in Javascript.

Note that in many cases, the controllers integrate a microcontroller that performs this inner loop.  (Some motor driver IC's themselves or the integrate such a microcontroller for this purpose).  Having this offloaded to the controllers when possible would eliminate any artifacts that are caused by latency and wireless connections.

For controllers with multiple haptic motors that work in unison, would instantiating an effect with vibrate() on each motor provide sufficient timing accuracy?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/32#issuecomment-247163347

Received on Wednesday, 14 September 2016 21:39:17 UTC