Mobile Device Orientation
window.onorientationchange = function(event) { var yaw = event.alpha; var pitch = event.beta; var roll = event.gamma; // You could make a compass! };