瀏覽代碼

Revert "Improve Matrix3 closure performance"

This reverts commit 2b46f6288c2c570c0eea2471d9c79deff2a06ffd.
Joe Fox 8 年之前
父節點
當前提交
f509880f46
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/math/Matrix3.js

+ 3 - 1
src/math/Matrix3.js

@@ -92,10 +92,12 @@ Object.assign( Matrix3.prototype, {
 
 	applyToBufferAttribute: function () {
 
-		var v1 = new Vector3();
+		var v1;
 
 		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 );