Skip to content

Comment on Google uses accelerometer API in Jules Verne Google Doodle

Comments

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...

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() )

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.