GridHelper.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Object3D] &rarr; [page:Line] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">The GridHelper is an object to define grids. Grids are two-dimensional arrays of lines.</p>
  14. <h2>Code Example</h2>
  15. <code>var size = 10;
  16. var divisions = 10;
  17. var gridHelper = new THREE.GridHelper( size, divisions );
  18. scene.add( gridHelper );
  19. </code>
  20. <h2>Examples</h2>
  21. <p>
  22. [example:webgl_helpers WebGL / helpers]
  23. </p>
  24. <h2>Constructor</h2>
  25. <h3>[name]( [param:number size], [param:Number divisions], [param:Color colorCenterLine], [param:Color colorGrid] )</h3>
  26. <p>
  27. size -- The size of the grid. Default is 10. <br />
  28. divisions -- The number of divisions across the grid. Default is 10. <br />
  29. colorCenterLine -- The color of the centerline. This can be a [page:Color], a hexadecimal value and an CSS-Color name. Default is 0x444444 <br />
  30. 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
  31. </p>
  32. <p>
  33. Creates a new [name] of size 'size' and divided into 'divisions' segments per side. Colors are optional.
  34. </p>
  35. <h2>Source</h2>
  36. <p>
  37. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  38. </p>
  39. </body>
  40. </html>