1 | import { Vector2 } from "../../math/Vector2.js";
|
2 | import { Curve } from "../core/Curve.js";
|
3 |
|
4 | /**
|
5 | * A curve representing a **2D** line segment.
|
6 | * @see {@link https://threejs.org/docs/index.html#api/en/extras/curves/LineCurve | Official Documentation}
|
7 | * @see {@link https://github.com/mrdoob/three.js/blob/master/src/extras/curves/LineCurve.js | Source}
|
8 | */
|
9 | export class LineCurve extends Curve<Vector2> {
|
10 | /**
|
11 | * This constructor creates a new {@link LineCurve}.
|
12 | * @param v1 The start point. Default is `new THREE.Vector2()`.
|
13 | * @param v2 The end point. Default is `new THREE.Vector2()`.
|
14 | */
|
15 | constructor(v1?: Vector2, v2?: Vector2);
|
16 |
|
17 | /**
|
18 | * Read-only flag to check if a given object is of type { LineCurve}.
|
19 | * This is a _constant_ value
|
20 | * `true`
|
21 | */
|
22 | readonly isLineCurve = true;
|
23 |
|
24 | /**
|
25 | * A Read-only _string_ to check if `this` object type.
|
26 | * @remarks Sub-classes will update this value.
|
27 | * @defaultValue `LineCurve`
|
28 | */
|
29 | override readonly type: string | "LineCurve";
|
30 |
|
31 | /**
|
32 | * The start point.
|
33 | * @defaultValue `new THREE.Vector2()`
|
34 | */
|
35 | v1: Vector2;
|
36 |
|
37 | /**
|
38 | * The end point
|
39 | * @defaultValue `new THREE.Vector2()`
|
40 | */
|
41 | v2: Vector2;
|
42 | }
|