PolarGridHelper.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 radials = 16;
  17. const circles = 8;
  18. const divisions = 64;
  19. const helper = new THREE.PolarGridHelper( radius, radials, circles, 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 radials], [param:Number circles], [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. radials -- The number of radial lines. This can be any positive integer. Default is 16.<br />
  31. circles -- The number of circles. 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 'radials' number of radials and 'circles' number of circles, where each circle is smoothed into 'divisions' number of line segments. Colors are optional.
  38. </p>
  39. <h2>Source</h2>
  40. <p>
  41. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  42. </p>
  43. </body>
  44. </html>