GridHelper.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 GridHelper is an object to define grids. Grids are two-dimensional
  14. arrays of lines.
  15. </p>
  16. <h2>Code Example</h2>
  17. <code>
  18. const size = 10;
  19. const divisions = 10;
  20. const gridHelper = new THREE.GridHelper( size, divisions );
  21. scene.add( gridHelper );
  22. </code>
  23. <h2>Examples</h2>
  24. <p>[example:webgl_helpers WebGL / helpers]</p>
  25. <h2>Constructor</h2>
  26. <h3>
  27. [name]( [param:number size], [param:Number divisions], [param:Color colorCenterLine], [param:Color colorGrid] )
  28. </h3>
  29. <p>
  30. size -- The size of the grid. Default is `10`. <br />
  31. divisions -- The number of divisions across the grid. Default is `10`.
  32. <br />
  33. colorCenterLine -- The color of the centerline. This can be a
  34. [page:Color], a hexadecimal value and an CSS-Color name. Default is
  35. 0x444444 <br />
  36. colorGrid -- The color of the lines of the grid. This can be a
  37. [page:Color], a hexadecimal value and an CSS-Color name. Default is
  38. 0x888888
  39. </p>
  40. <p>
  41. Creates a new [name] of size 'size' and divided into 'divisions' segments
  42. per side. Colors are optional.
  43. </p>
  44. <h2>Methods</h2>
  45. <p>See the base [page:LineSegments] class for common methods.</p>
  46. <h3>[method:undefined dispose]()</h3>
  47. <p>
  48. Frees the GPU-related resources allocated by this instance. Call this
  49. method whenever this instance is no longer used in your app.
  50. </p>
  51. <h2>Source</h2>
  52. <p>
  53. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  54. </p>
  55. </body>
  56. </html>