ArrowHelper.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Object3D] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">An 3D arrow Object.</div>
  14. <h2>Example</h2>
  15. <code>var dir = new THREE.Vector3( 1, 0, 0 );
  16. var origin = new THREE.Vector3( 0, 0, 0 );
  17. var length = 1;
  18. var hex = 0xffff00;
  19. var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
  20. scene.add( arrowHelper );
  21. </code>
  22. <h2>Constructor</h2>
  23. <h3>[name]([page:Vector3 dir], [page:Vector3 origin], [page:Number length], [page:Number hex], [page:Number headLength], [page:Number headWidth] )</h3>
  24. <div>
  25. dir -- Vector3 -- direction from origin. Must be a unit vector. <br />
  26. origin -- Vector3 <br />
  27. length -- scalar <br />
  28. hex -- hexadecimal value to define color ex:0xffff00<br />
  29. headLength -- The length of the head of the arrow<br />
  30. headWidth -- The length of the width of the arrow
  31. </div>
  32. <div>
  33. This creates an arrow starting in origin in the direction dir for a certain length. It is also possible to change color.
  34. </div>
  35. <h2>Properties</h2>
  36. <h3>[property:Line line]</h3>
  37. <div>
  38. Contains the line part of the arrowHelper.
  39. </div>
  40. <h3>[property:Mesh cone]</h3>
  41. <div>
  42. Contains the cone part of the arrowHelper.
  43. </div>
  44. <h2>Methods</h2>
  45. <h3>[method:null setColor]([page:Number hex])</h3>
  46. <div>
  47. hex -- The hexadicmal value of the color
  48. </div>
  49. <div>
  50. Sets the color of the arrowHelper.
  51. </div>
  52. <h3>[method:null setLength]([page:Number length], [page:Number headLength], [page:Number headWidth])</h3>
  53. <div>
  54. length -- The desired length<br />
  55. headLength -- The length of the head of the arrow<br />
  56. headWidth -- The length of the width of the arrow
  57. </div>
  58. <div>
  59. Sets the length of the arrowhelper.
  60. </div>
  61. <h3>[method:null setDirection]([page:Vector3 dir])</h3>
  62. <div>
  63. dir -- The desired direction. Must be a unit vector.
  64. </div>
  65. <div>
  66. Sets the direction of the arrowhelper.
  67. </div>
  68. <h2>Source</h2>
  69. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  70. </body>
  71. </html>