소스 검색

Optimising THREE.Path::splineThru

Nicholas Kinsey 14 년 전
부모
커밋
c36a538104
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/extras/core/Path.js

+ 1 - 1
src/extras/core/Path.js

@@ -125,7 +125,7 @@ THREE.Path.prototype.splineThru = function( pts /*Array of Vector*/ ) {
 	var y0 = lastargs[ lastargs.length - 1 ];
 //---
 	var npts = [ new THREE.Vector2( x0, y0 ) ];
-	npts =  npts.concat( pts );
+	Array.prototype.push.apply( npts, pts );
 
 	var curve = new THREE.SplineCurve( npts );
 	this.curves.push( curve );