提交 e4f9ece5 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #10501 from waitingcheung/curve

Fix default value for divisions
......@@ -67,7 +67,7 @@ Curve.prototype = {
getPoints: function ( divisions ) {
if ( ! divisions ) divisions = 5;
if ( isNaN( divisions ) ) divisions = 5;
var points = [];
......@@ -85,7 +85,7 @@ Curve.prototype = {
getSpacedPoints: function ( divisions ) {
if ( ! divisions ) divisions = 5;
if ( isNaN( divisions ) ) divisions = 5;
var points = [];
......@@ -112,7 +112,7 @@ Curve.prototype = {
getLengths: function ( divisions ) {
if ( ! divisions ) divisions = ( this.__arcLengthDivisions ) ? ( this.__arcLengthDivisions ) : 200;
if ( isNaN( divisions ) ) divisions = ( this.__arcLengthDivisions ) ? ( this.__arcLengthDivisions ) : 200;
if ( this.cacheArcLengths
&& ( this.cacheArcLengths.length === divisions + 1 )
......
......@@ -139,7 +139,7 @@ CurvePath.prototype = Object.assign( Object.create( Curve.prototype ), {
getSpacedPoints: function ( divisions ) {
if ( ! divisions ) divisions = 40;
if ( isNaN( divisions ) ) divisions = 40;
var points = [];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册