Skip to content

Let's shake baby! shake.js is cool framework that uses Vibrate API from HTML5 to making smartphones shake-up in different ways. You can use shake.js in your project to make your app more interactive

License

Notifications You must be signed in to change notification settings

marcoshmendes/shake.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

~~ Shake.JS ~~

Let's shake baby! shake.js is a cool framework that uses Vibrate API from HTML5 to make smartphones shake up in different ways. You can use shake.js in your project to make your app more interactive, like notifications, games and others.

Installation

bower install shakejs --save

Usage

import script to your HTML and you're done!

<script src="shake.min.js"></script>

Now, use the object shake on your script, it has a unique method named tremble('param'), you can manipulate vibration modes through this method.

The function accept one param from its list, you can check it out below

//List of possible values

shake.tremble("zigZig");
shake.tremble("continous");
shake.tremble("sms");
shake.tremble("badum");
shake.tremble("alarmClock");
shake.tremble("sos");
shake.tremble("intruders");
shake.tremble("annoying");
shake.tremble("doorBell");

Support

You can check browser support for this functionality on this link: https://caniuse.com/#search=Vibration%20API

About

Let's shake baby! shake.js is cool framework that uses Vibrate API from HTML5 to making smartphones shake-up in different ways. You can use shake.js in your project to make your app more interactive

Topics

Resources

License

Stars

Watchers

Forks

Packages