GridHelper.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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:Line] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">The GridHelper is an object to define grids. Grids are two-dimensional arrays of lines.</div>
  14. <h2>Example</h2>
  15. <code>var size = 10;
  16. var step = 1;
  17. var gridHelper = new THREE.GridHelper( size, step );
  18. scene.add( gridHelper );
  19. </code>
  20. [example:webgl_helpers Example using various helpers]
  21. <h2>Constructor</h2>
  22. <h3>[name]([page:number size], [page:Number step])</h3>
  23. <div>
  24. size -- The size of the grid <br />
  25. step -- The size of the step between 2 lines
  26. </div>
  27. <div>
  28. Creates a new [name] of size 'size' and with steps of size 'step'.
  29. </div>
  30. <h2>Methods</h2>
  31. <h3>[method:null setColors]([page:number colorCenterLine], [page:Number colorGrid])</h3>
  32. <div>
  33. colorCenterLine -- The color of the centerline. This can be a [page:Color], a hexadecimal value and an CSS-Color name. <br />
  34. colorGrid -- The color of the lines of the grid. This can be a [page:Color], a hexadecimal value and an CSS-Color name.
  35. </div>
  36. <div>
  37. Updates the color of the grid lines.
  38. </div>
  39. <h2>Source</h2>
  40. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  41. </body>
  42. </html>