-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20140 from DefinitelyMaybe/src/extras/curves--mov…
…e-to-es6-classes src/extras/curves: move to es6 classes
- Loading branch information
Showing
10 changed files
with
499 additions
and
545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
import { EllipseCurve } from './EllipseCurve.js'; | ||
|
||
function ArcCurve( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { | ||
class ArcCurve extends EllipseCurve { | ||
|
||
EllipseCurve.call( this, aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise ); | ||
constructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { | ||
|
||
this.type = 'ArcCurve'; | ||
super( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise ); | ||
|
||
} | ||
|
||
ArcCurve.prototype = Object.create( EllipseCurve.prototype ); | ||
ArcCurve.prototype.constructor = ArcCurve; | ||
this.type = 'ArcCurve'; | ||
Object.defineProperty( this, 'isArcCurve', { value: true } ); | ||
|
||
ArcCurve.prototype.isArcCurve = true; | ||
} | ||
|
||
} | ||
|
||
export { ArcCurve }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.