PolarGridHelper.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>PolarGridHelper - 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">PolarGridHelper</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This helper is an object to define polar grids. Grids are
  17. two-dimensional arrays of lines.</p></div>
  18. <h2>Code Example</h2>
  19. <div translate="no"><pre><code class="language-js">const radius = 10;
  20. const sectors = 16;
  21. const rings = 8;
  22. const divisions = 64;
  23. const helper = new THREE.PolarGridHelper( radius, sectors, rings, divisions );
  24. scene.add( helper );
  25. </code></pre></div>
  26. </header>
  27. <article>
  28. <div class="container-overview">
  29. <h2>Constructor</h2>
  30. <h3 class="name name-method" id="PolarGridHelper" translate="no">new <a href="#PolarGridHelper">PolarGridHelper</a><span class="signature">( radius : <span class="param-type">number</span>, sectors : <span class="param-type">number</span>, rings : <span class="param-type">number</span>, divisions : <span class="param-type">number</span>, color1 : <span class="param-type">number | <a href="Color.html">Color</a> | string</span>, color2 : <span class="param-type">number | <a href="Color.html">Color</a> | string</span> )</span> </h3>
  31. <div class="method">
  32. <div class="description">
  33. <p>Constructs a new polar grid helper.</p>
  34. </div>
  35. <table class="params">
  36. <tbody>
  37. <tr>
  38. <td class="name">
  39. <strong>radius</strong>
  40. </td>
  41. <td class="description last">
  42. <p>The radius of the polar grid. This can be any positive number.</p>
  43. <p>Default is <code>10</code>.</p>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="name">
  48. <strong>sectors</strong>
  49. </td>
  50. <td class="description last">
  51. <p>The number of sectors the grid will be divided into. This can be any positive integer.</p>
  52. <p>Default is <code>16</code>.</p>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td class="name">
  57. <strong>rings</strong>
  58. </td>
  59. <td class="description last">
  60. <p>The number of rings. This can be any positive integer.</p>
  61. <p>Default is <code>16</code>.</p>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td class="name">
  66. <strong>divisions</strong>
  67. </td>
  68. <td class="description last">
  69. <p>The number of line segments used for each circle. This can be any positive integer.</p>
  70. <p>Default is <code>64</code>.</p>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td class="name">
  75. <strong>color1</strong>
  76. </td>
  77. <td class="description last">
  78. <p>The first color used for grid elements.</p>
  79. <p>Default is <code>0x444444</code>.</p>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td class="name">
  84. <strong>color2</strong>
  85. </td>
  86. <td class="description last">
  87. <p>The second color used for grid elements.</p>
  88. <p>Default is <code>0x888888</code>.</p>
  89. </td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. </div>
  94. </div>
  95. <h2 class="subsection-title">Methods</h2>
  96. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  97. <div class="method">
  98. <div class="description">
  99. <p>Frees the GPU-related resources allocated by this instance. Call this
  100. method whenever this instance is no longer used in your app.</p>
  101. </div>
  102. </div>
  103. <h2 class="subsection-title">Source</h2>
  104. <p>
  105. <a href="https://github.com/mrdoob/three.js/blob/master/src/helpers/PolarGridHelper.js" translate="no" target="_blank" rel="noopener">src/helpers/PolarGridHelper.js</a>
  106. </p>
  107. </article>
  108. </section>
  109. <script src="../scripts/linenumber.js"></script>
  110. <script src="../scripts/page.js"></script>
  111. </body>
  112. </html>
粤ICP备19079148号