News for hackers. Stuff that matters.
Re:Google uses accelerometer API in Jules Verne Google Doodle by willscott on Tuesday February 08, 2011 @12:59AM (#2192142)
The accelerometer interaction hooks into javascript via browser events.

Here's the basic usage for chrome: (for firefox the event is MozOrientation, and values are radians rather than degrees)

  window.addEventListener('deviceorientation', function(evt) {
    var x = evt.gamma, y = evt.beta;
  }, false);

There are no comments on this comment yet.