PolarGridHelper.html 2.2 KB

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