ソースを参照

DeviceOrientationControls: Check for alpha instead of gamma. Fixes #5509.

Mr.doob 10 年 前
コミット
1be7adcc9f
1 ファイル変更1 行追加1 行削除
  1. 1 1
      examples/js/controls/DeviceOrientationControls.js

+ 1 - 1
examples/js/controls/DeviceOrientationControls.js

@@ -81,7 +81,7 @@ THREE.DeviceOrientationControls = function ( object ) {
 
 		if ( scope.freeze ) return;
 
-		var alpha  = scope.deviceOrientation.gamma ? THREE.Math.degToRad( scope.deviceOrientation.alpha ) : 0; // Z
+		var alpha  = scope.deviceOrientation.alpha ? THREE.Math.degToRad( scope.deviceOrientation.alpha ) : 0; // Z
 		var beta   = scope.deviceOrientation.beta  ? THREE.Math.degToRad( scope.deviceOrientation.beta  ) : 0; // X'
 		var gamma  = scope.deviceOrientation.gamma ? THREE.Math.degToRad( scope.deviceOrientation.gamma ) : 0; // Y''
 		var orient = scope.screenOrientation       ? THREE.Math.degToRad( scope.screenOrientation       ) : 0; // O