Skip to content

Robin-front/vibrate.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vibrate.js

A lightweight,non-dependent vibrate library for javascript

use

setPattern

// set default vibrate pattern;
// Vibrate 'SOS' in Morse.
// vibe.setPattern([pattern]);
vibe.setPattern([1000,300,1000,300,1000,2000,2000,300,2000,300,2000,2000,1000,300,1000,300,1000]);
or
vibe.setPattern(200);

once

// run vibrate once; if no arg, it will get the default pattern;
// vibe.once([pattern]);
vibe.once(200);// vibrate for 200ms

stop

// stop the vibrate anytime;
vibe.stop();

loop

// run vibrate loop with gap; if no arg, it will get the default pattern;
// vibe.loop([pattern, interval]);
vibe.loop([1000, 100, 300], 100);

create vibration patterns

vibe.js tool by felipenmoura

About

A lightweight,non-dependent vibrate library for javascript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published