haptic-feedback-swift
v1.3.0
Published
Generate haptic feedback on the trackpad without delay in MacOS via NodeJS.
Downloads
22
Maintainers
Readme
HapticFeedback in Swift
Generate haptic feedback on the trackpad without delay in MacOS via NodeJS.
Installation
npm i haptic-feedback-swift
Example
const { HapticFeedback } = require('haptic-feedback-swift')
const hapticFeedback = new HapticFeedback()
//Trigger
hapticFeedback.trigger()
//Feedback Pattern: NSHapticFeedbackManager.FeedbackPattern
hapticFeedback.trigger('alignment')
//Example
while(true) {
hapticFeedback.trigger('levelChange')
}
Documentation
developer.apple.com - NSHapticFeedbackManager.FeedbackPattern