Browse Source

Improve Matrix3 closure performance

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

+ 1 - 3
src/math/Matrix3.js

@@ -97,12 +97,10 @@ Object.assign( Matrix3.prototype, {
 
 	applyToBufferAttribute: function () {
 
-		var v1;
+		var v1 = new Vector3();
 
 		return function applyToBufferAttribute( attribute ) {
 
-			if ( v1 === undefined ) v1 = new Vector3();
-
 			for ( var i = 0, l = attribute.count; i < l; i ++ ) {
 
 				v1.x = attribute.getX( i );