Parcourir la source

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

CatmullRomCurve3: Ensure zero is valid argument for tension.
Mr.doob il y a 5 ans
Parent
commit
370282e68f
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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.closed = closed || false;
 	this.curveType = curveType || 'centripetal';
-	this.tension = tension || 0.5;
+	this.tension = ( tension !== undefined ) ? tension : 0.5;
 
 }