Просмотр исходного кода

replaces setRotationFromQuaternion with quaternion.fromArray

Diego Marcos 11 лет назад
Родитель
Сommit
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 );
 		}
 	};
 

粤ICP备19079148号