3 ms·
Spec (for webkit based browsers): http://dev.w3.org/geo/api/spec-source-orientation.html http://dev.w3.org/geo/api/spec-source-orientation.html of how to access
by ars 16y ago
Spec (for webkit based browsers): http://dev.w3.org/geo/api/spec-source-orientation.html 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_orientation https://developer.mozilla.org/en/Detecting_device_orientatio...
- paulirish 16y agoYou can view source on this page for the normalization code to harmonize both implementations: http://studio.html5rocks.com/samples/orientation/index.html http://studio.html5rocks.com/samples/orientation/index.html (see VideoPhysicsController.prototype._onTilt() )