소스 검색

Improve Matrix3 closure performance

Tristan VALCKE 8 년 전
부모
커밋
2b46f6288c
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  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 );