@@ -3,27 +3,28 @@ import { Vector2 } from '../../math/Vector2.js';
33
44class EllipseCurve extends Curve {
55
6- constructor ( aX , aY , xRadius , yRadius , aStartAngle , aEndAngle , aClockwise , aRotation ) {
6+ constructor ( aX = 0 , aY = 0 , xRadius = 1 , yRadius = 1 , aStartAngle = 0 , aEndAngle = Math . PI * 2 , aClockwise = false , aRotation = 0 ) {
77
88 super ( ) ;
99
1010 this . type = 'EllipseCurve' ;
1111 this . isEllipseCurve = true ;
1212
13- this . aX = aX || 0 ;
14- this . aY = aY || 0 ;
13+ this . aX = aX ;
14+ this . aY = aY ;
1515
16- this . xRadius = xRadius || 1 ;
17- this . yRadius = yRadius || 1 ;
16+ this . xRadius = xRadius ;
17+ this . yRadius = yRadius ;
1818
19- this . aStartAngle = aStartAngle || 0 ;
20- this . aEndAngle = aEndAngle || 2 * Math . PI ;
19+ this . aStartAngle = aStartAngle ;
20+ this . aEndAngle = aEndAngle ;
2121
22- this . aClockwise = aClockwise || false ;
22+ this . aClockwise = aClockwise ;
2323
24- this . aRotation = aRotation || 0 ;
24+ this . aRotation = aRotation ;
2525
2626 }
27+
2728 getPoint ( t , optionalTarget ) {
2829
2930 const point = optionalTarget || new Vector2 ( ) ;
@@ -85,6 +86,7 @@ class EllipseCurve extends Curve {
8586 return point . set ( x , y ) ;
8687
8788 }
89+
8890 copy ( source ) {
8991
9092 super . copy ( source ) ;
@@ -105,6 +107,7 @@ class EllipseCurve extends Curve {
105107 return this ;
106108
107109 }
110+
108111 toJSON ( ) {
109112
110113 const data = super . toJSON ( ) ;
@@ -125,6 +128,7 @@ class EllipseCurve extends Curve {
125128 return data ;
126129
127130 }
131+
128132 fromJSON ( json ) {
129133
130134 super . fromJSON ( json ) ;
0 commit comments