PolarGridHelper.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Object3D] &rarr; [page:Line] &rarr; [page:LineSegments] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. The PolarGridHelper is an object to define polar grids. Grids are
  14. two-dimensional arrays of lines.
  15. </p>
  16. <h2>Code Example</h2>
  17. <code>
  18. const radius = 10;
  19. const sectors = 16;
  20. const rings = 8;
  21. const divisions = 64;
  22. const helper = new THREE.PolarGridHelper( radius, sectors, rings, divisions );
  23. scene.add( helper );
  24. </code>
  25. <h2>Examples</h2>
  26. <p>[example:webgl_helpers WebGL / helpers]</p>
  27. <h2>Constructor</h2>
  28. <h3>
  29. [name]( [param:Number radius], [param:Number sectors], [param:Number rings], [param:Number divisions], [param:Color color1], [param:Color color2] )
  30. </h3>
  31. <p>
  32. radius -- The radius of the polar grid. This can be any positive number.
  33. Default is `10`.<br />
  34. sectors -- The number of sectors the grid will be divided into. This can
  35. be any positive integer. Default is `16`.<br />
  36. rings -- The number of rings. This can be any positive integer. Default is
  37. 8.<br />
  38. divisions -- The number of line segments used for each circle. This can be
  39. any positive integer that is 3 or greater. Default is `64`.<br />
  40. color1 -- The first color used for grid elements. This can be a
  41. [page:Color], a hexadecimal value and an CSS-Color name. Default is
  42. 0x444444 <br />
  43. color2 -- The second color used for grid elements. This can be a
  44. [page:Color], a hexadecimal value and an CSS-Color name. Default is
  45. 0x888888
  46. </p>
  47. <p>
  48. Creates a new [name] of radius 'radius' with 'sectors' number of sectors
  49. and 'rings' number of rings, where each circle is smoothed into
  50. 'divisions' number of line segments. Colors are optional.
  51. </p>
  52. <h2>Methods</h2>
  53. <p>See the base [page:LineSegments] class for common methods.</p>
  54. <h3>[method:undefined dispose]()</h3>
  55. <p>
  56. Frees the GPU-related resources allocated by this instance. Call this
  57. method whenever this instance is no longer used in your app.
  58. </p>
  59. <h2>Source</h2>
  60. <p>
  61. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  62. </p>
  63. </body>
  64. </html>