GridHelper.html 1.7 KB

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