File size: 1,475 Bytes
2b7aae2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { Vector3 } from './../math/Vector3';
import { Line } from './../objects/Line';
import { Mesh } from './../objects/Mesh';
import { Object3D } from './../core/Object3D';
import { ColorRepresentation } from '../utils';

// Extras / Helpers /////////////////////////////////////////////////////////////////////

export class ArrowHelper extends Object3D {
	/**
	 * @param [dir] Direction from origin. Must be a unit vector.
	 * @param [origin] Point at which the arrow starts.
	 * @param [length] Length of the arrow.
	 * @param [color] Hexadecimal value to define color.
	 * @param [headLength] The length of the head of the arrow.
	 * @param [headWidth] The width of the head of the arrow.
	 */
	constructor(dir?: Vector3, origin?: Vector3, length?: number, color?: ColorRepresentation, headLength?: number, headWidth?: number);

	/**
	 * @default 'ArrowHelper'
	 */
	type: string;

	/**
	 * Contains the line part of the arrowHelper.
	 */
	line: Line;

	/**
	 * Contains the cone part of the arrowHelper.
	 */
	cone: Mesh;

	/**
	 * @param dir The desired direction. Must be a unit vector.
	 */
	setDirection(dir: Vector3): void;

	/**
	 * @param length The desired length.
	 * @param [headLength] The length of the head of the arrow.
	 * @param [headWidth] The width of the head of the arrow.
	 */
	setLength(length: number, headLength?: number, headWidth?: number): void;

	/**
	 * @param color The desired color.
	 */
	setColor(color: ColorRepresentation): void;
}