-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(haptics): adds haptics for magic trackpads (#908)
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/node_modules/hapticjs/.DS_Store b/node_modules/hapticjs/.DS_Store | ||
new file mode 100644 | ||
index 0000000..487d1a1 | ||
Binary files /dev/null and b/node_modules/hapticjs/.DS_Store differ | ||
diff --git a/node_modules/hapticjs/app.js b/node_modules/hapticjs/app.js | ||
index 0821d19..1fa9828 100644 | ||
--- a/node_modules/hapticjs/app.js | ||
+++ b/node_modules/hapticjs/app.js | ||
@@ -1,10 +1,10 @@ | ||
+var os = require("os") | ||
var exec = require('child_process').exec | ||
var path = require('path') | ||
var cmd = path.join(__dirname, 'hapticJS', 'DerivedData', 'hapticJS', 'Build', 'Products', 'Release', 'hapticJS') | ||
|
||
exports.vibrate = function() { | ||
if (os.platform().includes('darwin')) { | ||
- console.log('vibrating now...') | ||
exec(cmd, function(error, stdout, stderr) { | ||
// command output is in stdout | ||
}) | ||
diff --git a/node_modules/hapticjs/hapticJS/.DS_Store b/node_modules/hapticjs/hapticJS/.DS_Store | ||
new file mode 100644 | ||
index 0000000..57ae955 | ||
Binary files /dev/null and b/node_modules/hapticjs/hapticJS/.DS_Store differ | ||
diff --git a/node_modules/hapticjs/hapticJS/DerivedData/.DS_Store b/node_modules/hapticjs/hapticJS/DerivedData/.DS_Store | ||
new file mode 100644 | ||
index 0000000..487d1a1 | ||
Binary files /dev/null and b/node_modules/hapticjs/hapticJS/DerivedData/.DS_Store differ | ||
diff --git a/node_modules/hapticjs/hapticJS/DerivedData/hapticJS/.DS_Store b/node_modules/hapticjs/hapticJS/DerivedData/hapticJS/.DS_Store | ||
new file mode 100644 | ||
index 0000000..9d704a3 | ||
Binary files /dev/null and b/node_modules/hapticjs/hapticJS/DerivedData/hapticJS/.DS_Store differ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters