GridHelper.html 1.4 KB

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