Browse Source

Revert "Improve Matrix3 closure performance"

This reverts commit 2b46f6288c2c570c0eea2471d9c79deff2a06ffd.
Joe Fox 8 years ago
parent
commit
f509880f46
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/math/Matrix3.js

+ 3 - 1
src/math/Matrix3.js

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