@@ -168,7 +168,13 @@ THREE.Path.prototype.ellipse = function ( aX, aY, xRadius, yRadius,
168168THREE . Path . prototype . absellipse = function ( aX , aY , xRadius , yRadius ,
169169 aStartAngle , aEndAngle , aClockwise , aRotation ) {
170170
171- var args = Array . prototype . slice . call ( arguments ) ;
171+ var args = [
172+ aX , aY ,
173+ xRadius , yRadius ,
174+ aStartAngle , aEndAngle ,
175+ aClockwise ,
176+ aRotation || 0 // aRotation is optional.
177+ ] ;
172178 var curve = new THREE . EllipseCurve ( aX , aY , xRadius , yRadius ,
173179 aStartAngle , aEndAngle , aClockwise , aRotation ) ;
174180 this . curves . push ( curve ) ;
@@ -387,7 +393,7 @@ THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
387393 yRadius = args [ 3 ] ,
388394 aStartAngle = args [ 4 ] , aEndAngle = args [ 5 ] ,
389395 aClockwise = ! ! args [ 6 ] ,
390- aRotation = args [ 7 ] || 0 ;
396+ aRotation = args [ 7 ] ;
391397
392398
393399 var deltaAngle = aEndAngle - aStartAngle ;
@@ -419,9 +425,11 @@ THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
419425
420426 if ( aRotation !== 0 ) {
421427
428+ var x = tx , y = ty ;
429+
422430 // Rotate the point about the center of the ellipse.
423- tx = ( tx - aX ) * cos - ( ty - aY ) * sin + aX ;
424- ty = ( tx - aX ) * sin + ( ty - aY ) * cos + aY ;
431+ tx = ( x - aX ) * cos - ( y - aY ) * sin + aX ;
432+ ty = ( x - aX ) * sin + ( y - aY ) * cos + aY ;
425433
426434 }
427435
0 commit comments