Skip to content

Instantly share code, notes, and snippets.

@moreguppy
Created September 19, 2014 14:19
Show Gist options
  • Save moreguppy/96eab3403369349bd2fe to your computer and use it in GitHub Desktop.
Save moreguppy/96eab3403369349bd2fe to your computer and use it in GitHub Desktop.
Tilt device for output
window.ondevicemotion = function(event) {
var accelerationX = event.accelerationIncludingGravity.x;
var accelerationY = event.accelerationIncludingGravity.y;
var accelerationZ = event.accelerationIncludingGravity.z;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment