A Haxe/Lime extension that implements Haptic Feedback effects on Android and iOS Devices.
You can install it through Haxelib
haxelib install extension-hapticsOr through Git, if you want the latest updates
haxelib git extension-haptics https://github.com/LimeExtensions/extension-haptics.gitimport extension.haptics.Haptic;
// Initialize the haptic system
Haptic.initialize();
// Trigger a oneshot vibration
Haptic.vibrateOneShot(0.5, 0.75); // 0.5 seconds duration, 75% intensity
// Trigger a pattern vibration
Haptic.vibratePattern([0.2, 0.4, 0.2], [1.0, 0.5, 0.8]); // Durations and amplitudes
// Dispose of the haptic system
Haptic.dispose();extension-haptics is made available under the MIT License. Check LICENSE for more information.