Browse Source

Improve Euler closure performance

Tristan VALCKE 8 years ago
parent
commit
e3eb4e545a
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/math/Euler.js

+ 1 - 3
src/math/Euler.js

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