12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <script src="../../../list.js"></script>
- <script src="../../../page.js"></script>
- <link type="text/css" rel="stylesheet" href="../../../page.css" />
- </head>
- <body>
- <h1>[name]</h1>
- <div class="desc">An 3D arrow Object.</div>
- <h2>Example</h2>
- <code>var dir = new THREE.Vector3( 1, 0, 0 );
- 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>
- dir -- Vector3 -- direction from origin <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
- </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>
- <h3>.[page:Line line]</h3>
- <div>
- Contains the line part of the arrowHelper.
- </div>
- <h3>.[page:Mesh cone]</h3>
- <div>
- Contains the cone part of the arrowHelper.
- </div>
- <h2>Methods</h2>
- <h3>.setColor([page:Number hex])</h3>
- <div>
- hex -- The hexadicmal value of the color
- </div>
- <div>
- Sets the color of the arrowHelper.
- </div>
- <h3>.setLength([page:Number length])</h3>
- <div>
- length -- The desired length
- </div>
- <div>
- Sets the length of the arrowhelper.
- </div>
- <h3>.setDirection([page:vector3 dir])</h3>
- <div>
- dir -- The desired direction in euler format.
- </div>
- <div>
- 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>
|