Browse Source

Revert "Improve Euler closure performance"

This reverts commit e3eb4e545a009b6900f2392c445c606e420294df.
Joe Fox 8 years ago
parent
commit
46d1289231
1 changed files with 3 additions and 1 deletions
  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 );