Live data from Hacker News

Google uses accelerometer API in Jules Verne Google Doodle

googleblog.blogspot.com

1–10 of 33 posts

Re: Google uses accelerometer API in Jules Verne Google Doodle

#6
post #5
post #2

And which devices that support Firefox or Chrome actually have accelerometers? It doesn't work on my Froyo phone...

the nexus 1/s, probably.

Default Nexus 1 install has a Mobile Webkit browser, which doesn't even get the interactive version.

It works - somewhat - on an iPad - but there's a problem in that tilting the iPad makes the screen rotate and locking the screen seems to disable the tilt events.

Best experience is on a MacBook with Chrome, IMHO.

Re: Google uses accelerometer API in Jules Verne Google Doodle

#7
post #5

Earlier quoted context omitted.

the nexus 1/s, probably.

Default Nexus 1 install has a Mobile Webkit browser, which doesn't even get the interactive version. It works - somewhat - on an iPad - but there's a problem in that tilting the iPad makes the screen rotate and locking the screen seems to disable the tilt events. Best experience is on a MacBook with Chrome, IMHO.

I just tried it with my mac. I was surprised that chrome had access to the accelerometers. I thought they were only used to make sure the hard drive doesn't die in case of dropage.

Re: Google uses accelerometer API in Jules Verne Google Doodle

#8
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);

Re: Google uses accelerometer API in Jules Verne Google Doodle

#9
post #7

Earlier quoted context omitted.

Default Nexus 1 install has a Mobile Webkit browser, which doesn't even get the interactive version. It works - somewhat - on an iPad - but there's a problem in that tilting the iPad makes the screen rotate and locking the screen seems to disable the tilt events. Best experience is on a MacBook with Chrome, IMHO.

I just tried it with my mac. I was surprised that chrome had access to the accelerometers. I thought they were only used to make sure the hard drive doesn't die in case of dropage.

Never tried http://blog.isnoop.net/2006/05/20/macsaber-turn-your-mac-int... ?
Post reply on HN