Skip to content

Commit 5d36fb7

Browse files
degToRad fix in vendor (aframevr#5064)
1 parent 06561af commit 5d36fb7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vendor/DeviceOrientationControls.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ THREE.DeviceOrientationControls = function ( object ) {
8585

8686
if ( device ) {
8787

88-
var alpha = device.alpha ? THREE.Math.degToRad( device.alpha ) + scope.alphaOffset : 0; // Z
88+
var alpha = device.alpha ? THREE.MathUtils.degToRad( device.alpha ) + scope.alphaOffset : 0; // Z
8989

90-
var beta = device.beta ? THREE.Math.degToRad( device.beta ) : 0; // X'
90+
var beta = device.beta ? THREE.MathUtils.degToRad( device.beta ) : 0; // X'
9191

92-
var gamma = device.gamma ? THREE.Math.degToRad( device.gamma ) : 0; // Y''
92+
var gamma = device.gamma ? THREE.MathUtils.degToRad( device.gamma ) : 0; // Y''
9393

94-
var orient = scope.screenOrientation ? THREE.Math.degToRad( scope.screenOrientation ) : 0; // O
94+
var orient = scope.screenOrientation ? THREE.MathUtils.degToRad( scope.screenOrientation ) : 0; // O
9595

9696
setObjectQuaternion( scope.object.quaternion, alpha, beta, gamma, orient );
9797

0 commit comments

Comments
 (0)