ArrowHelper.html 2.0 KB
Newer Older
1 2 3
<!DOCTYPE html>
<html lang="en">
	<head>
4
		<meta charset="utf-8" />
5 6 7 8 9 10
		<script src="../../../list.js"></script>
		<script src="../../../page.js"></script>
		<link type="text/css" rel="stylesheet" href="../../../page.css" />
	</head>
	<body>
		<h1>[name]</h1>
M
Mr.doob 已提交
11

G
gero3 已提交
12
		<div class="desc">An 3D arrow Object.</div>
M
Mr.doob 已提交
13 14


J
jox81 已提交
15 16
		<h2>Example</h2>

M
Mr.doob 已提交
17 18
		<code>var dir = new THREE.Vector3( 1, 0, 0 );
		var origin = new THREE.Vector3( 0, 0, 0 );
M
Mr.doob 已提交
19 20 21
		var length = 1;
		var hex = 0xffff00;

M
Mr.doob 已提交
22
		var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
M
Mr.doob 已提交
23
		scene.add( arrowHelper );
J
jox81 已提交
24 25
		</code>

M
Mr.doob 已提交
26 27


28
		<h2>Constructor</h2>
M
Mr.doob 已提交
29

C
cjshannon 已提交
30

G
gero3 已提交
31
		<h3>[name]([page:Vector3 dir], [page:Vector3 origin], [page:Number length], [page:Number hex], [page:Number headLength], [page:Number headWidth] )</h3>
C
cjshannon 已提交
32
		<div>
J
jox81 已提交
33 34 35
		dir -- Vector3 -- direction from origin <br />
		origin -- Vector3 <br />
		length -- scalar <br />
G
gero3 已提交
36 37 38
		hex -- hexadecimal value to define color ex:0xffff00<br />
		headLength -- The length of the head of the arrow<br />
		headWidth -- The length of the width of the arrow
C
cjshannon 已提交
39 40
		</div>
		<div>
G
gero3 已提交
41
		This creates an arrow starting in origin in the direction dir for a certain length. It is also possible to change color.
C
cjshannon 已提交
42
		</div>
M
Mr.doob 已提交
43 44


45
		<h2>Properties</h2>
M
Mr.doob 已提交
46 47 48



C
cjshannon 已提交
49 50
		<h3>.[page:Line line]</h3>
		<div>
G
gero3 已提交
51
		Contains the line part of the arrowHelper.
C
cjshannon 已提交
52 53 54 55
		</div> 

		<h3>.[page:Mesh cone]</h3>
		<div>
G
gero3 已提交
56
		Contains the cone part of the arrowHelper.
C
cjshannon 已提交
57 58
		</div> 

59
		<h2>Methods</h2>
M
Mr.doob 已提交
60 61 62



G
gero3 已提交
63
		<h3>.setColor([page:Number hex])</h3>
C
cjshannon 已提交
64
		<div>
G
gero3 已提交
65
		hex -- The hexadicmal value of the color
C
cjshannon 已提交
66 67
		</div>
		<div>
G
gero3 已提交
68
		Sets the color of the arrowHelper.
C
cjshannon 已提交
69 70
		</div>

G
gero3 已提交
71
		<h3>.setLength([page:Number length])</h3>
C
cjshannon 已提交
72
		<div>
G
gero3 已提交
73
		length -- The desired length
C
cjshannon 已提交
74 75
		</div>
		<div>
G
gero3 已提交
76
		Sets the length of the arrowhelper.
C
cjshannon 已提交
77 78
		</div>

G
gero3 已提交
79
		<h3>.setDirection([page:vector3 dir])</h3>
C
cjshannon 已提交
80
		<div>
G
gero3 已提交
81
		dir -- The desired direction in euler format.
C
cjshannon 已提交
82 83
		</div>
		<div>
G
gero3 已提交
84
		Sets the direction of the arrowhelper.
C
cjshannon 已提交
85 86
		</div>

87
		<h2>Source</h2>
M
Mr.doob 已提交
88

89 90 91
		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
	</body>
</html>