AxesHelper.html 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>AxesHelper - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Line.html">Line</a> → <a href="LineSegments.html">LineSegments</a> → </p>
  13. <h1 translate="no">AxesHelper</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>An axis object to visualize the 3 axes in a simple way.
  17. The X axis is red. The Y axis is green. The Z axis is blue.</p></div>
  18. <h2>Code Example</h2>
  19. <div translate="no"><pre><code class="language-js">const axesHelper = new THREE.AxesHelper( 5 );
  20. scene.add( axesHelper );
  21. </code></pre></div>
  22. </header>
  23. <article>
  24. <div class="container-overview">
  25. <h2>Constructor</h2>
  26. <h3 class="name name-method" id="AxesHelper" translate="no">new <a href="#AxesHelper">AxesHelper</a><span class="signature">( size : <span class="param-type">number</span> )</span> </h3>
  27. <div class="method">
  28. <div class="description">
  29. <p>Constructs a new axes helper.</p>
  30. </div>
  31. <table class="params">
  32. <tbody>
  33. <tr>
  34. <td class="name"><code>size</code></td>
  35. <td class="description last"><p>Size of the lines representing the axes.<br/>Default is <code>1</code>.</p></td>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </div>
  40. </div>
  41. <h2 class="subsection-title">Methods</h2>
  42. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  43. <div class="method">
  44. <div class="description">
  45. <p>Frees the GPU-related resources allocated by this instance. Call this
  46. method whenever this instance is no longer used in your app.</p>
  47. </div>
  48. </div>
  49. <h3 class="name name-method" id="setColors" translate="no">.<a href="#setColors">setColors</a><span class="signature">( xAxisColor : <span class="param-type">number | Color | string</span>, yAxisColor : <span class="param-type">number | Color | string</span>, zAxisColor : <span class="param-type">number | Color | string</span> )</span><span class="type-signature"> : <a href="AxesHelper.html">AxesHelper</a></span> </h3>
  50. <div class="method">
  51. <div class="description">
  52. <p>Defines the colors of the axes helper.</p>
  53. </div>
  54. <table class="params">
  55. <tbody>
  56. <tr>
  57. <td class="name"><code>xAxisColor</code></td>
  58. <td class="description last"><p>The color for the x axis.</p></td>
  59. </tr>
  60. <tr>
  61. <td class="name"><code>yAxisColor</code></td>
  62. <td class="description last"><p>The color for the y axis.</p></td>
  63. </tr>
  64. <tr>
  65. <td class="name"><code>zAxisColor</code></td>
  66. <td class="description last"><p>The color for the z axis.</p></td>
  67. </tr>
  68. </tbody>
  69. </table>
  70. <dl class="details">
  71. <dt class="tag-returns"><strong>Returns:</strong> A reference to this axes helper.</dt>
  72. </dl>
  73. </div>
  74. <h2 class="subsection-title">Source</h2>
  75. <p>
  76. <a href="https://github.com/mrdoob/three.js/blob/master/src/helpers/AxesHelper.js" target="_blank" rel="noopener" translate="no">src/helpers/AxesHelper.js</a>
  77. </p>
  78. </article>
  79. </section>
  80. <script src="../scripts/linenumber.js"></script>
  81. <script src="../scripts/page.js"></script>
  82. </body>
  83. </html>
粤ICP备19079148号