Haptics PRO
Haptics exposes Core Haptics for scripts that need custom tactile patterns beyond the lightweight HapticFeedback helpers.
Use Haptics.transient() or Haptics.continuous() for simple one-shot effects. Use HapticEngine, HapticPattern, HapticEvent, and parameter objects when you need precise timing, envelopes, dynamic parameters, AHAP data, or reusable pattern players.
Pattern Playback
Engine
new HapticEngine(audioSession?)
Creates a Core Haptics engine. Omit audioSession for the default engine, pass null to let Core Haptics create its own audio session, or pass SharedAudioSession to share the app audio session.
Static Capabilities
Properties
Methods
Synchronous methods throw JavaScript Error objects when Core Haptics reports a failure. Promise methods reject with Error.
Events and Parameters
Common event types:
"hapticTransient""hapticContinuous""audioContinuous""audioCustom"
Common event parameters:
"hapticIntensity""hapticSharpness""attackTime""decayTime""releaseTime""sustained"
AHAP Data
HapticPattern.fromDictionary(dictionary) accepts an AHAP-style dictionary, and pattern.exportDictionary() returns a dictionary representation of a pattern.
