Преглед изворни кода

Improve Euler closure performance

Tristan VALCKE пре 9 година
родитељ
комит
e3eb4e545a
1 измењених фајлова са 1 додато и 3 уклоњено
  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 );

粤ICP备19079148号