Explorar o código

replaces setRotationFromQuaternion with quaternion.fromArray

Diego Marcos %!s(int64=11) %!d(string=hai) anos
pai
achega
82f4739614
Modificáronse 1 ficheiros con 1 adicións e 7 borrados
  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 );
 		}
 	};