浏览代码

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 );