فهرست منبع

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

Mr.doob 12 سال پیش
والد
کامیت
18f27df17d
1فایلهای تغییر یافته به همراه2 افزوده شده و 4 حذف شده
  1. 2 4
      src/math/Vector3.js

+ 2 - 4
src/math/Vector3.js

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