Closed jsantell closed 6 years ago
@dustinkerstein ping for review, not a fan of the UA parsing but not sure what other indicators we have here. Thinking of browsers that report Chrome in UA, but those should have the same deviceorientation unit change. Seems safe but need to give it more thought/testing.
Note that Chrome 66 just fixed a bug to follow the spec, other browsers did it right. So this logic seems wrong:
if (this.isIOS || this.isFirefoxAndroid || this.isChromeUsingDegrees) {
this.gyroscope.multiplyScalar(Math.PI / 180);
}
and should be vice versa, something simple like this:
if (! this.isChromeUsingDegrees) {
this.gyroscope.multiplyScalar(Math.PI / 180);
}
(don't know about Edge, though)
@1jj I agree with you, but hesitant for devices that could have changed behaviour when they're not covered by these conditionals. Before releasing a new version, will be doing a full test on devices with possibly that change if there's no breakage
Now in degrees rather than radians. Fixes #18.