|
@@ -12,12 +12,21 @@
|
|
|
|
|
|
<h1>[name]</h1>
|
|
<h1>[name]</h1>
|
|
|
|
|
|
- <div class="desc">An 3D arrow Object.</div>
|
|
|
|
|
|
+ <div class="desc">An 3D arrow object for visualizing directions.</div>
|
|
|
|
|
|
|
|
|
|
<h2>Example</h2>
|
|
<h2>Example</h2>
|
|
|
|
|
|
- <code>var dir = new THREE.Vector3( 1, 0, 0 );
|
|
|
|
|
|
+ <div>[example:webgl_geometries WebGL / geometries]</div>
|
|
|
|
+ <div>[example:webgl_geometry_normals WebGL / geometry / normals]</div>
|
|
|
|
+ <div>[example:webgl_shadowmesh WebGL / shadowmesh]</div>
|
|
|
|
+
|
|
|
|
+ <code>
|
|
|
|
+ var dir = new THREE.Vector3( 1, 2, 0 );
|
|
|
|
+
|
|
|
|
+ //normalize the direction vector (convert to vector of length 1)
|
|
|
|
+ dir.normalize();
|
|
|
|
+
|
|
var origin = new THREE.Vector3( 0, 0, 0 );
|
|
var origin = new THREE.Vector3( 0, 0, 0 );
|
|
var length = 1;
|
|
var length = 1;
|
|
var hex = 0xffff00;
|
|
var hex = 0xffff00;
|
|
@@ -33,59 +42,52 @@
|
|
|
|
|
|
<h3>[name]([page:Vector3 dir], [page:Vector3 origin], [page:Number length], [page:Number hex], [page:Number headLength], [page:Number headWidth] )</h3>
|
|
<h3>[name]([page:Vector3 dir], [page:Vector3 origin], [page:Number length], [page:Number hex], [page:Number headLength], [page:Number headWidth] )</h3>
|
|
<div>
|
|
<div>
|
|
- dir -- Vector3 -- direction from origin. Must be a unit vector. <br />
|
|
|
|
- origin -- Vector3 <br />
|
|
|
|
- length -- scalar <br />
|
|
|
|
- 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
|
|
|
|
|
|
+ [page:Vector3 dir] -- direction from origin. Must be a unit vector. <br />
|
|
|
|
+ [page:Vector3 origin] -- Point at which the arrow starts.<br />
|
|
|
|
+ [page:Number length] -- length of the arrow. Default is *1*.<br />
|
|
|
|
+ [page:Number hex] -- hexadecimal value to define color. Default is 0xffff00.<br />
|
|
|
|
+ [page:Number headLength] -- The length of the head of the arrow. Default is 0.2 * length.<br />
|
|
|
|
+ [page:Number headWidth] -- The length of the width of the arrow. Default is 0.2 * headLength.
|
|
</div>
|
|
</div>
|
|
- <div>
|
|
|
|
- This creates an arrow starting in origin in the direction dir for a certain length. It is also possible to change color.
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
|
|
|
|
<h2>Properties</h2>
|
|
<h2>Properties</h2>
|
|
-
|
|
|
|
|
|
+ <div>See the base [page:Object3D] class for common properties.</div>
|
|
|
|
|
|
|
|
|
|
<h3>[property:Line line]</h3>
|
|
<h3>[property:Line line]</h3>
|
|
- <div>
|
|
|
|
- Contains the line part of the arrowHelper.
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div>Contains the line part of the arrowHelper.</div>
|
|
|
|
|
|
<h3>[property:Mesh cone]</h3>
|
|
<h3>[property:Mesh cone]</h3>
|
|
- <div>
|
|
|
|
- Contains the cone part of the arrowHelper.
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div>Contains the cone part of the arrowHelper.</div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
<h2>Methods</h2>
|
|
<h2>Methods</h2>
|
|
|
|
+ <div>See the base [page:Object3D] class for common methods.</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>[method:null setColor]([page:Number hex])</h3>
|
|
<h3>[method:null setColor]([page:Number hex])</h3>
|
|
<div>
|
|
<div>
|
|
- hex -- The hexadicmal value of the color
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
|
|
+ hex -- The hexadicmal value of the color.<br /><br />
|
|
|
|
+
|
|
Sets the color of the arrowHelper.
|
|
Sets the color of the arrowHelper.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:null setLength]([page:Number length], [page:Number headLength], [page:Number headWidth])</h3>
|
|
<h3>[method:null setLength]([page:Number length], [page:Number headLength], [page:Number headWidth])</h3>
|
|
<div>
|
|
<div>
|
|
- length -- The desired length<br />
|
|
|
|
- headLength -- The length of the head of the arrow<br />
|
|
|
|
- headWidth -- The length of the width of the arrow
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
|
|
+ length -- The desired length.<br />
|
|
|
|
+ headLength -- The length of the head of the arrow.<br />
|
|
|
|
+ headWidth -- The length of the width of the arrow.<br /><br />
|
|
|
|
+
|
|
Sets the length of the arrowhelper.
|
|
Sets the length of the arrowhelper.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:null setDirection]([page:Vector3 dir])</h3>
|
|
<h3>[method:null setDirection]([page:Vector3 dir])</h3>
|
|
<div>
|
|
<div>
|
|
- dir -- The desired direction. Must be a unit vector.
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
|
|
+ dir -- The desired direction. Must be a unit vector.<br /><br />
|
|
|
|
+
|
|
Sets the direction of the arrowhelper.
|
|
Sets the direction of the arrowhelper.
|
|
</div>
|
|
</div>
|
|
|
|
|