1 | import { Vector3 } from './../math/Vector3';
|
2 | import { Line } from './../objects/Line';
|
3 | import { Mesh } from './../objects/Mesh';
|
4 | import { Object3D } from './../core/Object3D';
|
5 | import { ColorRepresentation } from '../utils';
|
6 |
|
7 |
|
8 |
|
9 | export class ArrowHelper extends Object3D {
|
10 | |
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | constructor(
|
19 | dir?: Vector3,
|
20 | origin?: Vector3,
|
21 | length?: number,
|
22 | color?: ColorRepresentation,
|
23 | headLength?: number,
|
24 | headWidth?: number,
|
25 | );
|
26 |
|
27 | /**
|
28 | * @default 'ArrowHelper'
|
29 | */
|
30 | type: string;
|
31 |
|
32 | /**
|
33 | * Contains the line part of the arrowHelper.
|
34 | */
|
35 | line: Line;
|
36 |
|
37 | /**
|
38 | * Contains the cone part of the arrowHelper.
|
39 | */
|
40 | cone: Mesh;
|
41 |
|
42 | /**
|
43 | * @param dir The desired direction. Must be a unit vector.
|
44 | */
|
45 | setDirection(dir: Vector3): void;
|
46 |
|
47 | /**
|
48 | * @param length The desired length.
|
49 | * @param [headLength] The length of the head of the arrow.
|
50 | * @param [headWidth] The width of the head of the arrow.
|
51 | */
|
52 | setLength(length: number, headLength?: number, headWidth?: number): void;
|
53 |
|
54 | /**
|
55 | * @param color The desired color.
|
56 | */
|
57 | setColor(color: ColorRepresentation): void;
|
58 | }
|