浏览代码

Merge pull request #19762 from dskeithbuck/dskeithbuck-catmull-defaults

CatmullRomCurve3: Ensure zero is valid argument for tension.
Mr.doob 5 年之前
父节点
当前提交
370282e68f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/extras/curves/CatmullRomCurve3.js

+ 1 - 1
src/extras/curves/CatmullRomCurve3.js

@@ -92,7 +92,7 @@ function CatmullRomCurve3( points, closed, curveType, tension ) {
 	this.points = points || [];
 	this.points = points || [];
 	this.closed = closed || false;
 	this.closed = closed || false;
 	this.curveType = curveType || 'centripetal';
 	this.curveType = curveType || 'centripetal';
-	this.tension = tension || 0.5;
+	this.tension = ( tension !== undefined ) ? tension : 0.5;
 
 
 }
 }