mrdoob/three.js — pull request #4475 by richtr (2014-02-19 23:20:34+00:00)
Title: Add W3C DeviceOrientation Event controls and demo

Provide camera controls based on the W3C Device Orientation Event specification (http://www.w3.org/TR/orientation-event/).

A demo using these controls is provided and can be viewed in the browser @ http://richtr.github.io/three.js/examples/misc_controls_deviceorientation.html.

These controls have been tested and currently work well in the following browsers:

* Chrome Beta for Android
* Opera Beta for Android
* Firefox Beta for Android

DeviceOrientation event support table: http://caniuse.com/#feat=deviceorientation

Note: Other browsers do not yet conform to the DeviceOrientation calibration described in the DeviceOrientation Event specification and/or do not provide absolute DeviceOrientation data values making it impossible to determine compassHeading with non-complete data.

Detection of browser/platform deviceorientation capabilities remain out-of-scope of this patch. Developers may test for the presence and calibration of DeviceOrientation Events prior to invoking the DeviceOrientation control.