UNPKG

1.72 kBTypeScriptView Raw
1import { EllipseCurve } from "./EllipseCurve.js";
2
3/**
4 * Alias for {@link THREE.EllipseCurve | EllipseCurve}.
5 * @see {@link https://threejs.org/docs/index.html#api/en/extras/curves/ArcCurve | Official Documentation}
6 * @see {@link https://github.com/mrdoob/three.js/blob/master/src/extras/curves/ArcCurve.js | Source}
7 */
8export class ArcCurve extends EllipseCurve {
9 /**
10 * This constructor creates a new {@link ArcCurve}.
11 * @param aX The X center of the ellipse. Expects a `Float`. Default is `0`.
12 * @param aY The Y center of the ellipse. Expects a `Float`. Default is `0`.
13 * @param xRadius The radius of the ellipse in the x direction. Expects a `Float`. Default is `1`.
14 * @param yRadius The radius of the ellipse in the y direction. Expects a `Float`. Default is `1`.
15 * @param aStartAngle The start angle of the curve in radians starting from the positive X axis. Default is `0`.
16 * @param aEndAngle The end angle of the curve in radians starting from the positive X axis. Default is `2 x Math.PI`.
17 * @param aClockwise Whether the ellipse is drawn clockwise. Default is `false`.
18 */
19 constructor(
20 aX?: number,
21 aY?: number,
22 aRadius?: number,
23 aStartAngle?: number,
24 aEndAngle?: number,
25 aClockwise?: boolean,
26 );
27
28 /**
29 * Read-only flag to check if a given object is of type {@link ArcCurve}.
30 * @remarks This is a _constant_ value
31 * @defaultValue `true`
32 */
33 readonly isArcCurve = true;
34
35 /**
36 * A Read-only _string_ to check if `this` object type.
37 * @remarks Sub-classes will update this value.
38 * @defaultValue `ArcCurve`
39 */
40 override readonly type: string | "ArcCurve";
41}