1
0

AxesHelper.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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">
  35. <strong>size</strong>
  36. </td>
  37. <td class="description last">
  38. <p>Size of the lines representing the axes.</p>
  39. <p>Default is <code>1</code>.</p>
  40. </td>
  41. </tr>
  42. </tbody>
  43. </table>
  44. </div>
  45. </div>
  46. <h2 class="subsection-title">Methods</h2>
  47. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  48. <div class="method">
  49. <div class="description">
  50. <p>Frees the GPU-related resources allocated by this instance. Call this
  51. method whenever this instance is no longer used in your app.</p>
  52. </div>
  53. </div>
  54. <h3 class="name name-method" id="setColors" translate="no">.<a href="#setColors">setColors</a><span class="signature">( xAxisColor : <span class="param-type">number | <a href="Color.html">Color</a> | string</span>, yAxisColor : <span class="param-type">number | <a href="Color.html">Color</a> | string</span>, zAxisColor : <span class="param-type">number | <a href="Color.html">Color</a> | string</span> )</span><span class="type-signature"> : <a href="AxesHelper.html">AxesHelper</a></span> </h3>
  55. <div class="method">
  56. <div class="description">
  57. <p>Defines the colors of the axes helper.</p>
  58. </div>
  59. <table class="params">
  60. <tbody>
  61. <tr>
  62. <td class="name">
  63. <strong>xAxisColor</strong>
  64. </td>
  65. <td class="description last">
  66. <p>The color for the x axis.</p>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td class="name">
  71. <strong>yAxisColor</strong>
  72. </td>
  73. <td class="description last">
  74. <p>The color for the y axis.</p>
  75. </td>
  76. </tr>
  77. <tr>
  78. <td class="name">
  79. <strong>zAxisColor</strong>
  80. </td>
  81. <td class="description last">
  82. <p>The color for the z axis.</p>
  83. </td>
  84. </tr>
  85. </tbody>
  86. </table>
  87. <dl class="details">
  88. <dt class="tag-returns"><strong>Returns:</strong> A reference to this axes helper.</dt>
  89. </dl>
  90. </div>
  91. <h2 class="subsection-title">Source</h2>
  92. <p>
  93. <a href="https://github.com/mrdoob/three.js/blob/master/src/helpers/AxesHelper.js" translate="no" target="_blank" rel="noopener">src/helpers/AxesHelper.js</a>
  94. </p>
  95. </article>
  96. </section>
  97. <script src="../scripts/linenumber.js"></script>
  98. <script src="../scripts/page.js"></script>
  99. </body>
  100. </html>
粤ICP备19079148号