https://github.com/subsoap/vibrate
Alternative vibrate extension primarially for Android
https://github.com/subsoap/vibrate
defold defold-game-engine defold-module
Last synced: about 1 year ago
JSON representation
Alternative vibrate extension primarially for Android
- Host: GitHub
- URL: https://github.com/subsoap/vibrate
- Owner: subsoap
- License: cc0-1.0
- Created: 2018-06-27T07:41:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-29T10:47:08.000Z (over 6 years ago)
- Last Synced: 2025-05-10T05:52:49.729Z (about 1 year ago)
- Topics: defold, defold-game-engine, defold-module
- Language: C++
- Size: 12.7 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vibrate
Alternative vibrate extension primarially for Android
https://github.com/subsoap/vibrate/archive/master.zip
```vibrate.vibrate(duration)```
If duration is not set it will default to 100.
```vibrate.cancel()```
```vibrate.vibrate({pattern})```
For example, ```vibrate.vibrate({0, 100, 200, 100, 500, 1000, 100, 250, 1000, 100})```
Patterns work based on {delay, duration, delay, duration ...} so in the example above there is no initial delay for the duration of 100ms, then a 200ms delay before another 100ms vibration duration and so on. Naturally you will want an even number of parameters, and only use positive whole numbers.