[w3c/gamepad] Support Buffered Haptic Effects (#39)

The "pulse" function added in PR #32 provides an easy to use, direct way to provide a simple, momentary actuation of vibration motors in controllers.

The goal of buffered haptics to is increase the variety of effects that can be expressed.  More advanced effects require millisecond-level precision updates to the actuators that provide haptic feedback.  The underlying hardware API's allow submission of arrays of values that are often uploaded wirelessly to the hardware itself for high frequency execution.

I would like to provide the ability to run these haptic effects asynchronously.  The UA can emulate the hardware buffering, so this functionality can be available on all controllers that support haptic feedback while taking advantage of hardware haptic buffering when available.

Fundamental features of the suggested interface:
- Synchronized playback of buffered haptics on multiple actuators
- One-shot playback of buffers
- Looped playback of buffers
- Attenuation of buffer playback
- Event on playback completion, enabling double-buffering of buffers streamed from Javascript
- Extensible with Javascript libraries to provide LFO (Low Frequency Oscillation), Envelopes (i.e. Attack, Decay, Sustain and Release), and integration with physics engines with attenuation of effects.


-- 
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/issues/39

Received on Monday, 26 September 2016 18:44:48 UTC