mrdoob/three.js — pull request #4577 by richtr (2014-03-14 10:40:05+00:00)
Title: Add arbitrary deviceorientation.alpha bug fix to DeviceOrientationControls.js

iOS devices return an arbitrary alpha value anchored at 0 in the device's orientation when the user initially loads a web page.

Apple introduced DeviceOrientationEvent.webkitCompassHeading to provide more 'spec-like' behavior and this should be used instead of the non-absolute 'alpha' value (see: http://lists.w3.org/Archives/Public/public-geolocation/2011Jul/0014.html)

This patch ensures THREE.DeviceOrientationControls orients itself in the same compass direction in iOS-based browsers.

[ping @WestLangley]