Przeglądaj źródła

Removed another unneeded quaternion variable. As per @WestLangley suggestion in 0e9f32f1dd9ba8ff51060795d6b53101b3e7582f.

Mr.doob 12 lat temu
rodzic
commit
18f27df17d
1 zmienionych plików z 2 dodań i 4 usunięć
  1. 2 4
      src/math/Vector3.js

+ 2 - 4
src/math/Vector3.js

@@ -624,13 +624,11 @@ THREE.extend( THREE.Vector3.prototype, {
 
 
 	applyAxisAngle: function () {
 	applyAxisAngle: function () {
 
 
-		var q1 = new THREE.Quaternion();
+		var quaternion = new THREE.Quaternion();
 
 
 		return function ( axis, angle ) {
 		return function ( axis, angle ) {
 
 
-			var quaternion = q1.setFromAxisAngle( axis, angle );
-
-			this.applyQuaternion( quaternion );
+			this.applyQuaternion( quaternion.setFromAxisAngle( axis, angle ) );
 
 
 			return this;
 			return this;