Преглед на файлове

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.closed = closed || false;
 	this.curveType = curveType || 'centripetal';
-	this.tension = tension || 0.5;
+	this.tension = ( tension !== undefined ) ? tension : 0.5;
 
 }