LineBasicMaterial.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LineBasicMaterial - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Material.html">Material</a> → </p>
  13. <h1 translate="no">LineBasicMaterial</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A material for rendering line primitives.</p>
  17. <p>Materials define the appearance of renderable 3D objects.</p></div>
  18. <h2>Code Example</h2>
  19. <div translate="no"><pre><code class="language-js">const material = new THREE.LineBasicMaterial( { color: 0xffffff } );
  20. </code></pre></div>
  21. </header>
  22. <article>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="LineBasicMaterial" translate="no">new <a href="#LineBasicMaterial">LineBasicMaterial</a><span class="signature">( parameters : <span class="param-type">Object</span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new line basic material.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name">
  34. <strong>parameters</strong>
  35. </td>
  36. <td class="description last">
  37. <p>An object with one or more properties
  38. defining the material's appearance. Any property of the material
  39. (including any property from inherited materials) can be passed
  40. in here. Color values can be passed any type of value accepted
  41. by <a href="Color.html#set">Color#set</a>.</p>
  42. </td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. <h2 class="subsection-title">Properties</h2>
  49. <div class="member">
  50. <h3 class="name" id="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : <a href="Color.html">Color</a></span> </h3>
  51. <div class="description">
  52. <p>Color of the material.</p>
  53. <p>Default is <code>(1,1,1)</code>.</p>
  54. </div>
  55. </div>
  56. <div class="member">
  57. <h3 class="name" id="fog" translate="no">.<a href="#fog">fog</a><span class="type-signature"> : boolean</span> </h3>
  58. <div class="description">
  59. <p>Whether the material is affected by fog or not.</p>
  60. <p>Default is <code>true</code>.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <h3 class="name" id="isLineBasicMaterial" translate="no">.<a href="#isLineBasicMaterial">isLineBasicMaterial</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  65. <div class="description">
  66. <p>This flag can be used for type testing.</p>
  67. <p>Default is <code>true</code>.</p>
  68. </div>
  69. </div>
  70. <div class="member">
  71. <h3 class="name" id="linecap" translate="no">.<a href="#linecap">linecap</a><span class="type-signature"> : 'butt' | 'round' | 'square'</span> </h3>
  72. <div class="description">
  73. <p>Defines appearance of line ends.</p>
  74. <p>Can only be used with <a href="SVGRenderer.html">SVGRenderer</a>.</p>
  75. <p>Default is <code>'round'</code>.</p>
  76. </div>
  77. </div>
  78. <div class="member">
  79. <h3 class="name" id="linejoin" translate="no">.<a href="#linejoin">linejoin</a><span class="type-signature"> : 'round' | 'bevel' | 'miter'</span> </h3>
  80. <div class="description">
  81. <p>Defines appearance of line joints.</p>
  82. <p>Can only be used with <a href="SVGRenderer.html">SVGRenderer</a>.</p>
  83. <p>Default is <code>'round'</code>.</p>
  84. </div>
  85. </div>
  86. <div class="member">
  87. <h3 class="name" id="linewidth" translate="no">.<a href="#linewidth">linewidth</a><span class="type-signature"> : number</span> </h3>
  88. <div class="description">
  89. <p>Controls line thickness or lines.</p>
  90. <p>Can only be used with <a href="SVGRenderer.html">SVGRenderer</a>. WebGL and WebGPU
  91. ignore this setting and always render line primitives with a
  92. width of one pixel.</p>
  93. <p>Default is <code>1</code>.</p>
  94. </div>
  95. </div>
  96. <div class="member">
  97. <h3 class="name" id="map" translate="no">.<a href="#map">map</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  98. <div class="description">
  99. <p>Sets the color of the lines using data from a texture. The texture map
  100. color is modulated by the diffuse <code>color</code>.</p>
  101. <p>Default is <code>null</code>.</p>
  102. </div>
  103. </div>
  104. <h2 class="subsection-title">Source</h2>
  105. <p>
  106. <a href="https://github.com/mrdoob/three.js/blob/master/src/materials/LineBasicMaterial.js" translate="no" target="_blank" rel="noopener">src/materials/LineBasicMaterial.js</a>
  107. </p>
  108. </article>
  109. </section>
  110. <script src="../scripts/linenumber.js"></script>
  111. <script src="../scripts/page.js"></script>
  112. </body>
  113. </html>
粤ICP备19079148号