Skip to content

edent/handshake-html5-vibrate-haptic-library

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HandShake

HandShake is a Haptic Effects Library which uses HTML5's Vibrate API.

We encourage you to submit interesting and useful vibration patterns as pull requests.

The vibrate API works by defining how long the phone or tablet's vibration motor is on or off.

navigator.vibrate([200, 100, 500]); means vibrate for 200ms, pause for 100ms, vibrate for 500ms.

For example

function countdown()	//	A 3 second countdown timer, suitable for a racing game.
{
	//                 3       2       1       Go!
	navigator.vibrate([300,700,300,700,300,700,1000]);
}

About

HTML5 Haptic Effects Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 66.1%
  • HTML 33.9%