소스 검색

Revert "Improve Euler closure performance"

This reverts commit e3eb4e545a009b6900f2392c445c606e420294df.
Joe Fox 8 년 전
부모
커밋
46d1289231
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/math/Euler.js

+ 3 - 1
src/math/Euler.js

@@ -255,10 +255,12 @@ Object.assign( Euler.prototype, {
 
 	setFromQuaternion: function () {
 
-		var matrix = new Matrix4();
+		var matrix;
 
 		return function setFromQuaternion( q, order, update ) {
 
+			if ( matrix === undefined ) matrix = new Matrix4();
+
 			matrix.makeRotationFromQuaternion( q );
 
 			return this.setFromRotationMatrix( matrix, order, update );