How haptic patterns work: Transient, Continuous, and Continuous Players
mainThe library provides three distinct ways to trigger haptics depending on your use case:
- Transient: Instant "click/tap" events. These have no duration and are triggered at a specific point in time.
- Continuous (pattern): Time-based patterns defined ahead of time. You provide events (which include a
duration) and optionally curves (which provide automation/modulation over time). - Continuous player (real-time): Used for unpredictable input like gesture positions or scroll velocity. You create a player once, then use a
start → update (many times) → stoplifecycle.
Note on Events vs. Curves:
- Events define the structure (what happens and when).
- Curves define the modulation (how parameters like intensity or sharpness evolve over time).