浏览代码

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;