1
0

LineBasicMaterial.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Material] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">A material for drawing wireframe-style geometries.</p>
  13. <h2>Code Example</h2>
  14. <code>
  15. const material = new THREE.LineBasicMaterial( {
  16. color: 0xffffff,
  17. linewidth: 1,
  18. linecap: 'round', //ignored by WebGLRenderer
  19. linejoin: 'round' //ignored by WebGLRenderer
  20. } );
  21. </code>
  22. <h2>Examples</h2>
  23. <p>
  24. [example:webgl_buffergeometry_drawrange WebGL / buffergeometry / drawrange]<br />
  25. [example:webgl_buffergeometry_lines WebGL / buffergeometry / lines]<br />
  26. [example:webgl_buffergeometry_lines_indexed WebGL / buffergeometry / lines / indexed]<br />
  27. [example:webgl_decals WebGL / decals]<br />
  28. [example:webgl_geometry_nurbs WebGL / geometry / nurbs]<br />
  29. [example:webgl_geometry_shapes WebGL / geometry / shapes]<br />
  30. [example:webgl_geometry_spline_editor WebGL / geometry / spline / editor]<br />
  31. [example:webgl_interactive_buffergeometry WebGL / interactive / buffergeometry]<br />
  32. [example:webgl_interactive_voxelpainter WebGL / interactive / voxelpainter]<br />
  33. [example:webgl_lines_colors WebGL / lines / colors]<br />
  34. [example:webgl_lines_dashed WebGL / lines / dashed]<br />
  35. [example:physics_ammo_rope physics / ammo / rope]
  36. </p>
  37. <h2>Constructor</h2>
  38. <h3>[name]( [param:Object parameters] )</h3>
  39. <p>
  40. [page:Object parameters] - (optional) an object with one or more
  41. properties defining the material's appearance. Any property of the
  42. material (including any property inherited from [page:Material]) can be
  43. passed in here.<br /><br />
  44. The exception is the property [page:Hexadecimal color], which can be
  45. passed in as a hexadecimal string and is `0xffffff` (white) by default.
  46. [page:Color.set]( color ) is called internally.
  47. </p>
  48. <h2>Properties</h2>
  49. <p>See the base [page:Material] class for common properties.</p>
  50. <h3>[property:Color color]</h3>
  51. <p>[page:Color] of the material, by default set to white (0xffffff).</p>
  52. <h3>[property:Boolean fog]</h3>
  53. <p>Whether the material is affected by fog. Default is `true`.</p>
  54. <h3>[property:Float linewidth]</h3>
  55. <p>
  56. Controls line thickness. Default is `1`.<br /><br />
  57. Due to limitations of the
  58. [link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]
  59. with the [page:WebGLRenderer WebGL] renderer on most
  60. platforms linewidth will always be `1` regardless of the set value.<br /><br />
  61. If you need wider lines, consider using [page:Line2] or [page:LineSegments2] with [page:LineMaterial].
  62. </p>
  63. <h3>[property:String linecap]</h3>
  64. <p>
  65. Define appearance of line ends. Possible values are 'butt', 'round' and
  66. 'square'. Default is 'round'.<br /><br />
  67. This corresponds to the
  68. [link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]
  69. property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
  70. </p>
  71. <h3>[property:String linejoin]</h3>
  72. <p>
  73. Define appearance of line joints. Possible values are 'round', 'bevel' and
  74. 'miter'. Default is 'round'. <br /><br />
  75. This corresponds to the
  76. [link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]
  77. property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
  78. </p>
  79. <h3>[property:Texture map]</h3>
  80. <p>Sets the color of the lines using data from a [page:Texture].</p>
  81. <h2>Methods</h2>
  82. <p>See the base [page:Material] class for common methods.</p>
  83. <h2>Source</h2>
  84. <p>
  85. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  86. </p>
  87. </body>
  88. </html>