GridHelper.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../../list.js"></script>
  6. <script src="../../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../../page.css" />
  8. </head>
  9. <body>
  10. [page:Line] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">The GridHelper is an object to define grids. Grids are two-dimensional arrays of lines.</div>
  13. <h2>Example</h2>
  14. <code>var size = 10;
  15. var step = 1;
  16. var gridHelper = new THREE.GridHelper( size, step );
  17. gridHelper.position = new THREE.Vector3( 10, 10, 0 );
  18. gridHelper.rotation = new THREE.Euler( 15, 0, 0 );
  19. scene.add( gridHelper );
  20. </code>
  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 btween 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>.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>