PolarGridHelper.html 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 | Color | string</span>, color2 : <span class="param-type">number | Color | 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"><code>radius</code></td>
  39. <td class="description last"><p>The radius of the polar grid. This can be any positive number.<br/>Default is <code>10</code>.</p></td>
  40. </tr>
  41. <tr>
  42. <td class="name"><code>sectors</code></td>
  43. <td class="description last"><p>The number of sectors the grid will be divided into. This can be any positive integer.<br/>Default is <code>16</code>.</p></td>
  44. </tr>
  45. <tr>
  46. <td class="name"><code>rings</code></td>
  47. <td class="description last"><p>The number of rings. This can be any positive integer.<br/>Default is <code>16</code>.</p></td>
  48. </tr>
  49. <tr>
  50. <td class="name"><code>divisions</code></td>
  51. <td class="description last"><p>The number of line segments used for each circle. This can be any positive integer.<br/>Default is <code>64</code>.</p></td>
  52. </tr>
  53. <tr>
  54. <td class="name"><code>color1</code></td>
  55. <td class="description last"><p>The first color used for grid elements.<br/>Default is <code>0x444444</code>.</p></td>
  56. </tr>
  57. <tr>
  58. <td class="name"><code>color2</code></td>
  59. <td class="description last"><p>The second color used for grid elements.<br/>Default is <code>0x888888</code>.</p></td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. <h2 class="subsection-title">Methods</h2>
  66. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  67. <div class="method">
  68. <div class="description">
  69. <p>Frees the GPU-related resources allocated by this instance. Call this
  70. method whenever this instance is no longer used in your app.</p>
  71. </div>
  72. </div>
  73. <h2 class="subsection-title">Source</h2>
  74. <p>
  75. <a href="https://github.com/mrdoob/three.js/blob/master/src/helpers/PolarGridHelper.js" target="_blank" rel="noopener" translate="no">src/helpers/PolarGridHelper.js</a>
  76. </p>
  77. </article>
  78. </section>
  79. <script src="../scripts/linenumber.js"></script>
  80. <script src="../scripts/page.js"></script>
  81. </body>
  82. </html>
粤ICP备19079148号