|
@@ -1,98 +1,98 @@
|
|
|
-<!DOCTYPE html>
|
|
|
-<html lang="en">
|
|
|
- <head>
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+ <head>
|
|
|
<meta charset="utf-8" />
|
|
|
- <base href="../../" />
|
|
|
- <script src="list.js"></script>
|
|
|
- <script src="page.js"></script>
|
|
|
- <link type="text/css" rel="stylesheet" href="page.css" />
|
|
|
- </head>
|
|
|
- <body>
|
|
|
- [page:Object3D] →
|
|
|
-
|
|
|
- <h1>[name]</h1>
|
|
|
-
|
|
|
- <div class="desc">An 3D arrow object for visualizing directions.</div>
|
|
|
-
|
|
|
-
|
|
|
- <h2>Example</h2>
|
|
|
-
|
|
|
- <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 length = 1;
|
|
|
- var hex = 0xffff00;
|
|
|
-
|
|
|
- var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
|
|
|
- scene.add( arrowHelper );
|
|
|
- </code>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <h2>Constructor</h2>
|
|
|
-
|
|
|
-
|
|
|
- <h3>[name]([page:Vector3 dir], [page:Vector3 origin], [page:Number length], [page:Number hex], [page:Number headLength], [page:Number headWidth] )</h3>
|
|
|
- <div>
|
|
|
- [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>
|
|
|
-
|
|
|
- <h2>Properties</h2>
|
|
|
- <div>See the base [page:Object3D] class for common properties.</div>
|
|
|
-
|
|
|
-
|
|
|
- <h3>[property:Line line]</h3>
|
|
|
- <div>Contains the line part of the arrowHelper.</div>
|
|
|
-
|
|
|
- <h3>[property:Mesh cone]</h3>
|
|
|
- <div>Contains the cone part of the arrowHelper.</div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <h2>Methods</h2>
|
|
|
- <div>See the base [page:Object3D] class for common methods.</div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <h3>[method:null setColor]([page:Number hex])</h3>
|
|
|
- <div>
|
|
|
- hex -- The hexadicmal value of the color.<br /><br />
|
|
|
-
|
|
|
- Sets the color of the arrowHelper.
|
|
|
- </div>
|
|
|
-
|
|
|
- <h3>[method:null setLength]([page:Number length], [page:Number headLength], [page:Number headWidth])</h3>
|
|
|
- <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.
|
|
|
- </div>
|
|
|
-
|
|
|
- <h3>[method:null setDirection]([page:Vector3 dir])</h3>
|
|
|
- <div>
|
|
|
- dir -- The desired direction. Must be a unit vector.<br /><br />
|
|
|
-
|
|
|
- Sets the direction of the arrowhelper.
|
|
|
- </div>
|
|
|
-
|
|
|
- <h2>Source</h2>
|
|
|
-
|
|
|
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
|
|
- </body>
|
|
|
-</html>
|
|
|
+ <base href="../../" />
|
|
|
+ <script src="list.js"></script>
|
|
|
+ <script src="page.js"></script>
|
|
|
+ <link type="text/css" rel="stylesheet" href="page.css" />
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ [page:Object3D] →
|
|
|
+
|
|
|
+ <h1>[name]</h1>
|
|
|
+
|
|
|
+ <div class="desc">An 3D arrow object for visualizing directions.</div>
|
|
|
+
|
|
|
+
|
|
|
+ <h2>Example</h2>
|
|
|
+
|
|
|
+ <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 length = 1;
|
|
|
+ var hex = 0xffff00;
|
|
|
+
|
|
|
+ var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
|
|
|
+ scene.add( arrowHelper );
|
|
|
+ </code>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <h2>Constructor</h2>
|
|
|
+
|
|
|
+
|
|
|
+ <h3>[name]([page:Vector3 dir], [page:Vector3 origin], [page:Number length], [page:Number hex], [page:Number headLength], [page:Number headWidth] )</h3>
|
|
|
+ <div>
|
|
|
+ [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>
|
|
|
+
|
|
|
+ <h2>Properties</h2>
|
|
|
+ <div>See the base [page:Object3D] class for common properties.</div>
|
|
|
+
|
|
|
+
|
|
|
+ <h3>[property:Line line]</h3>
|
|
|
+ <div>Contains the line part of the arrowHelper.</div>
|
|
|
+
|
|
|
+ <h3>[property:Mesh cone]</h3>
|
|
|
+ <div>Contains the cone part of the arrowHelper.</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <h2>Methods</h2>
|
|
|
+ <div>See the base [page:Object3D] class for common methods.</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <h3>[method:null setColor]([page:Number hex])</h3>
|
|
|
+ <div>
|
|
|
+ hex -- The hexadecimal value of the color.<br /><br />
|
|
|
+
|
|
|
+ Sets the color of the arrowHelper.
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h3>[method:null setLength]([page:Number length], [page:Number headLength], [page:Number headWidth])</h3>
|
|
|
+ <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.
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h3>[method:null setDirection]([page:Vector3 dir])</h3>
|
|
|
+ <div>
|
|
|
+ dir -- The desired direction. Must be a unit vector.<br /><br />
|
|
|
+
|
|
|
+ Sets the direction of the arrowhelper.
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h2>Source</h2>
|
|
|
+
|
|
|
+ [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
|
|
+ </body>
|
|
|
+</html>
|