Parcourir la source

Removed unnecessary computation

WestLangley il y a 4 ans
Parent
commit
b3ce8cd677
2 fichiers modifiés avec 0 ajouts et 6 suppressions
  1. 0 3
      examples/js/controls/FlyControls.js
  2. 0 3
      examples/jsm/controls/FlyControls.js

+ 0 - 3
examples/js/controls/FlyControls.js

@@ -200,9 +200,6 @@ THREE.FlyControls = function ( object, domElement ) {
 			scope.tmpQuaternion.set( scope.rotationVector.x * rotMult, scope.rotationVector.y * rotMult, scope.rotationVector.z * rotMult, 1 ).normalize();
 			scope.object.quaternion.multiply( scope.tmpQuaternion );
 
-			// expose the rotation vector for convenience
-			scope.object.rotation.setFromQuaternion( scope.object.quaternion, scope.object.rotation.order );
-
 			if (
 				lastPosition.distanceToSquared( scope.object.position ) > EPS ||
 				8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS

+ 0 - 3
examples/jsm/controls/FlyControls.js

@@ -204,9 +204,6 @@ var FlyControls = function ( object, domElement ) {
 			scope.tmpQuaternion.set( scope.rotationVector.x * rotMult, scope.rotationVector.y * rotMult, scope.rotationVector.z * rotMult, 1 ).normalize();
 			scope.object.quaternion.multiply( scope.tmpQuaternion );
 
-			// expose the rotation vector for convenience
-			scope.object.rotation.setFromQuaternion( scope.object.quaternion, scope.object.rotation.order );
-
 			if (
 				lastPosition.distanceToSquared( scope.object.position ) > EPS ||
 				8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS