소스 검색

replaces setRotationFromQuaternion with quaternion.fromArray

Diego Marcos 11 년 전
부모
커밋
82f4739614
1개의 변경된 파일1개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 7
      examples/js/controls/VRControls.js

+ 1 - 7
examples/js/controls/VRControls.js

@@ -45,13 +45,7 @@ THREE.VRControls = function ( camera, done ) {
 		}
 		// Applies head rotation from sensors data.
 		if ( camera ) {
-			quat = new THREE.Quaternion(
-				vrState.hmd.rotation[0],
-				vrState.hmd.rotation[1],
-				vrState.hmd.rotation[2],
-				vrState.hmd.rotation[3]
-			);
-			camera.setRotationFromQuaternion( quat );
+			camera.quaternion.fromArray( vrState.hmd.rotation );
 		}
 	};