

Google uses accelerometer API in Jules Verne Google Doodle - tomwans
http://googleblog.blogspot.com/2011/02/happy-birthday-from-20000-leagues-under.html

======
Hacktivist
Here are the images if you want to cheat.

<http://www.google.com/logos/2011/verne-hp-1.png>

<http://www.google.com/logos/2011/verne-hp-2.png>

<http://www.google.com/logos/2011/verne-hp-3.png>

<http://www.google.com/logos/2011/verne-hp-4.png>

------
nostrademons
FYI, the accelerometer works on a MacBook Pro with Chrome or Firefox as well.
I remember when Kris showed me the demo on his Mac, I was like "Wow, you can
do that on a normal laptop?"

~~~
ugh
All kinds of laptops have had accelerometers since the early 2000s or so. (IBM
ran commercials for their ThinkPads with “airbag” all the time. Yep, this was
already built into laptops when IBM still sold ThinkPads.) They stop the hard
drive when accelerations get too extreme.

~~~
Isamu
I thought they stopped the drive when the acceleration is zero (freefall). If
the acceleration is high, it's probably too late.

~~~
logophobia
Zero acceleration only happens after an object has been falling for a long
time (more then a few seconds) and the friction is in balance with gravity.
Zero acceleration also happens when the laptop is just sitting on a table.
Probably wouldn't be a good measure to stop the drive.

Initially, an object falling will accelerate with g=9.81m/s^2, after it
reaches the ground it will de-accelerate to a speed of 0m/s in a couple of ms.
You are confusing weightlessness/zero-g with no acceleration.

~~~
Isamu
I'm talking about the acceleration that the sensor is measuring. If you are
holding it still, it measures 1g toward the ground.

If the drive is falling, certainly it is accelerating toward the ground but
the sensor measures zero acceleration. This is the relative frame of
reference.

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

~~~
jonah
ThinkPads, Mac Laptops

~~~
mhansen
Doesn't work on my new Thinkpad T510, running Ubuntu and Chromium 9.0.

I know it has an accelerometer (I've seen the bundled Windows software use
it), but I don't know where the API to access that data is.

~~~
martey
See <http://www.thinkwiki.org/wiki/HDAPS> .

I am not sure whether Firefox or Chrome/Chromium on Linux will actually read
the data that is provided by hdaps.

~~~
mhansen
Thank you! :)

------
ars
Spec (for webkit based browsers): <http://dev.w3.org/geo/api/spec-source-
orientation.html> of how to access acceleration data.

Mozilla does it somewhat differently:

[https://developer.mozilla.org/en/Detecting_device_orientatio...](https://developer.mozilla.org/en/Detecting_device_orientation)

~~~
paulirish
You can view source on this page for the normalization code to harmonize both
implementations:

<http://studio.html5rocks.com/samples/orientation/index.html> (see
VideoPhysicsController.prototype._onTilt() )

------
willscott
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);

------
ben1040
Doesn't work on my 2010 Macbook Air. I was a little confused until it dawned
on me that due to the SSD, Apple had no reason to build in an accelerometer.

------
nrbafna
I navigated through the entire doodle just to see if there was something
encoded in it as well, like in the cr-48 ad.

~~~
tomwans
well ?

------
Groxx
Huzzah for Whale Sharks[1]! Funky critters. The "Google" at the bottom is a
nice touch, too.

[1]: <http://en.wikipedia.org/wiki/Whale_shark>

------
chaosmachine
It would be interesting to log this data, and try to figure out how many users
are leaning back, in a car, etc. I wonder what kind of patterns you'd see.

------
jrockway
Doesn't work on Android? Sometimes Google confuses me.

------
noonespecial
I didn't know they'd done it. I opened Firefox and grabbed my Macbook to head
for the couch and was most surprised by the awesome.

