LineBasicMaterial.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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:Material] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">A material for drawing wireframe-style geometries.</div>
  14. <h2>Examples</h2>
  15. <div>
  16. [example:webgl_buffergeometry_drawcalls WebGL / buffergeometry / drawcalls]<br />
  17. [example:webgl_buffergeometry_lines WebGL / buffergeometry / lines]<br />
  18. [example:webgl_buffergeometry_lines_indexed WebGL / buffergeometry / lines / indexed]<br />
  19. [example:webgl_decals WebGL / decals]<br />
  20. [example:webgl_geometry_nurbs WebGL / geometry / nurbs]<br />
  21. [example:webgl_geometry_shapes WebGL / geometry / shapes]<br />
  22. [example:webgl_geometry_spline_editor WebGL / geometry / spline / editor]<br />
  23. [example:webgl_interactive_buffergeometry WebGL / interactive / buffergeometry]<br />
  24. [example:webgl_interactive_voxelpainter WebGL / interactive / voxelpainter]<br />
  25. [example:webgl_lines_colors WebGL / lines / colors]<br />
  26. [example:webgl_lines_cubes WebGL / lines / cubes]<br />
  27. [example:webgl_lines_dashed WebGL / lines / dashed]<br />
  28. [example:webgl_lines_sphere WebGL / lines / sphere]<br />
  29. [example:webgl_lines_splines WebGL / lines / splines]<br />
  30. [example:webgl_materials WebGL / materials]<br />
  31. [example:webgl_physics_rope WebGL / phyics / rope]
  32. </div>
  33. <code>
  34. var material = new THREE.LineBasicMaterial( {
  35. color: 0xffffff,
  36. linewidth: 1,
  37. linecap: 'round', //ignored by WebGLRenderer
  38. linejoin: 'round' //ignored by WebGLRenderer
  39. } );
  40. </code>
  41. <h2>Constructor</h2>
  42. <h3>[name]( [page:Object parameters] )</h3>
  43. <div>
  44. [page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
  45. Any property of the material (including any property inherited from [page:Material]) can be passed in here.<br /><br />
  46. The exception is the property [page:Hexadecimal color], which can be passed in as a hexadecimal
  47. string and is *0xffffff* (white) by default. [page:Color.set]( color ) is called internally.
  48. </div>
  49. <h2>Properties</h2>
  50. <div>See the base [page:Material] class for common properties.</div>
  51. <h3>[property:Color color]</h3>
  52. <div>[page:Color] of the material, by default set to white (0xffffff).</div>
  53. <h3>[property:Boolean isLineBasicMaterial]</h3>
  54. <div>
  55. Used to check whether this or derived classes are line basic materials. Default is *true*.<br /><br />
  56. You should not change this, as it used internally for optimisation.
  57. </div>
  58. <h3>[property:Boolean lights]</h3>
  59. <div>Whether the material is affected by lights. Default is *false*.</div>
  60. <h3>[property:Float linewidth]</h3>
  61. <div>
  62. Controls line thickness. Default is *1*.<br /><br />
  63. Due to limitations in the [link:https://code.google.com/p/angleproject ANGLE layer],
  64. with the [page:WebGLRenderer WebGL] renderer on Windows platforms linewidth will
  65. always be 1 regardless of the set value.
  66. </div>
  67. <h3>[property:String linecap]</h3>
  68. <div>
  69. Define appearance of line ends. Possible values are 'butt', 'round' and 'square'.
  70. Default is 'round'.<br /><br />
  71. This corresponds to the [link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
  72. property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
  73. </div>
  74. <h3>[property:String linejoin]</h3>
  75. <div>
  76. Define appearance of line joints. Possible values are 'round', 'bevel' and 'miter'. Default is 'round'. <br /><br />
  77. This corresponds to the [link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
  78. property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
  79. </div>
  80. <h2>Methods</h2>
  81. <div>See the base [page:Material] class for common methods.</div>
  82. <h2>Source</h2>
  83. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  84. </body>
  85. </html>