MeshBasicMaterial.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>MeshBasicMaterial - 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">MeshBasicMaterial</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A material for drawing geometries in a simple shaded (flat or wireframe) way.</p>
  17. <p>This material is not affected by lights.</p></div>
  18. <iframe id="viewer" src="../scenes/material-browser.html#MeshBasicMaterial"></iframe>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="MeshBasicMaterial" translate="no">new <a href="#MeshBasicMaterial">MeshBasicMaterial</a><span class="signature">( parameters : <span class="param-type">Object</span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new mesh basic material.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name"><code>parameters</code></td>
  32. <td class="description last"><p>An object with one or more properties
  33. defining the material's appearance. Any property of the material
  34. (including any property from inherited materials) can be passed
  35. in here. Color values can be passed any type of value accepted
  36. by <a href="Color.html#set">Color#set</a>.</p></td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. </div>
  41. </div>
  42. <h2 class="subsection-title">Properties</h2>
  43. <div class="member">
  44. <h3 class="name" id="alphaMap" translate="no">.<a href="#alphaMap">alphaMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  45. <div class="description">
  46. <p>The alpha map is a grayscale texture that controls the opacity across the
  47. surface (black: fully transparent; white: fully opaque).</p>
  48. <p>Only the color of the texture is used, ignoring the alpha channel if one
  49. exists. For RGB and RGBA textures, the renderer will use the green channel
  50. when sampling this texture due to the extra bit of precision provided for
  51. green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
  52. luminance/alpha textures will also still work as expected.<br/>Default is <code>null</code>.</p>
  53. </div>
  54. </div>
  55. <div class="member">
  56. <h3 class="name" id="aoMap" translate="no">.<a href="#aoMap">aoMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  57. <div class="description">
  58. <p>The red channel of this texture is used as the ambient occlusion map.
  59. Requires a second set of UVs.<br/>Default is <code>null</code>.</p>
  60. </div>
  61. </div>
  62. <div class="member">
  63. <h3 class="name" id="aoMapIntensity" translate="no">.<a href="#aoMapIntensity">aoMapIntensity</a><span class="type-signature"> : number</span> </h3>
  64. <div class="description">
  65. <p>Intensity of the ambient occlusion effect. Range is <code>[0,1]</code>, where <code>0</code>
  66. disables ambient occlusion. Where intensity is <code>1</code> and the AO map's
  67. red channel is also <code>1</code>, ambient light is fully occluded on a surface.<br/>Default is <code>1</code>.</p>
  68. </div>
  69. </div>
  70. <div class="member">
  71. <h3 class="name" id="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : <a href="Color.html">Color</a></span> </h3>
  72. <div class="description">
  73. <p>Color of the material.<br/>Default is <code>(1,1,1)</code>.</p>
  74. </div>
  75. </div>
  76. <div class="member">
  77. <h3 class="name" id="combine" translate="no">.<a href="#combine">combine</a><span class="type-signature"> : <a href="global.html#MultiplyOperation">MultiplyOperation</a> | <a href="global.html#MixOperation">MixOperation</a> | <a href="global.html#AddOperation">AddOperation</a></span> </h3>
  78. <div class="description">
  79. <p>How to combine the result of the surface's color with the environment map, if any.</p>
  80. <p>When set to <code>MixOperation</code>, the <a href="MeshBasicMaterial.html#reflectivity">MeshBasicMaterial#reflectivity</a> is used to
  81. blend between the two colors.<br/>Default is <code>MultiplyOperation</code>.</p>
  82. </div>
  83. </div>
  84. <div class="member">
  85. <h3 class="name" id="envMap" translate="no">.<a href="#envMap">envMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  86. <div class="description">
  87. <p>The environment map.<br/>Default is <code>null</code>.</p>
  88. </div>
  89. </div>
  90. <div class="member">
  91. <h3 class="name" id="envMapRotation" translate="no">.<a href="#envMapRotation">envMapRotation</a><span class="type-signature"> : <a href="Euler.html">Euler</a></span> </h3>
  92. <div class="description">
  93. <p>The rotation of the environment map in radians.<br/>Default is <code>(0,0,0)</code>.</p>
  94. </div>
  95. </div>
  96. <div class="member">
  97. <h3 class="name" id="fog" translate="no">.<a href="#fog">fog</a><span class="type-signature"> : boolean</span> </h3>
  98. <div class="description">
  99. <p>Whether the material is affected by fog or not.<br/>Default is <code>true</code>.</p>
  100. </div>
  101. </div>
  102. <div class="member">
  103. <h3 class="name" id="isMeshBasicMaterial" translate="no">.<a href="#isMeshBasicMaterial">isMeshBasicMaterial</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  104. <div class="description">
  105. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  106. </div>
  107. </div>
  108. <div class="member">
  109. <h3 class="name" id="lightMap" translate="no">.<a href="#lightMap">lightMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  110. <div class="description">
  111. <p>The light map. Requires a second set of UVs.<br/>Default is <code>null</code>.</p>
  112. </div>
  113. </div>
  114. <div class="member">
  115. <h3 class="name" id="lightMapIntensity" translate="no">.<a href="#lightMapIntensity">lightMapIntensity</a><span class="type-signature"> : number</span> </h3>
  116. <div class="description">
  117. <p>Intensity of the baked light.<br/>Default is <code>1</code>.</p>
  118. </div>
  119. </div>
  120. <div class="member">
  121. <h3 class="name" id="map" translate="no">.<a href="#map">map</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  122. <div class="description">
  123. <p>The color map. May optionally include an alpha channel, typically combined
  124. with <a href="Material.html#transparent">Material#transparent</a> or <a href="Material.html#alphaTest">Material#alphaTest</a>. The texture map
  125. color is modulated by the diffuse <code>color</code>.<br/>Default is <code>null</code>.</p>
  126. </div>
  127. </div>
  128. <div class="member">
  129. <h3 class="name" id="reflectivity" translate="no">.<a href="#reflectivity">reflectivity</a><span class="type-signature"> : number</span> </h3>
  130. <div class="description">
  131. <p>How much the environment map affects the surface.
  132. The valid range is between <code>0</code> (no reflections) and <code>1</code> (full reflections).<br/>Default is <code>1</code>.</p>
  133. </div>
  134. </div>
  135. <div class="member">
  136. <h3 class="name" id="refractionRatio" translate="no">.<a href="#refractionRatio">refractionRatio</a><span class="type-signature"> : number</span> </h3>
  137. <div class="description">
  138. <p>The index of refraction (IOR) of air (approximately 1) divided by the
  139. index of refraction of the material. It is used with environment mapping
  140. modes <a href="global.html#CubeRefractionMapping">CubeRefractionMapping</a> and <a href="global.html#EquirectangularRefractionMapping">EquirectangularRefractionMapping</a>.
  141. The refraction ratio should not exceed <code>1</code>.<br/>Default is <code>0.98</code>.</p>
  142. </div>
  143. </div>
  144. <div class="member">
  145. <h3 class="name" id="specularMap" translate="no">.<a href="#specularMap">specularMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  146. <div class="description">
  147. <p>Specular map used by the material.<br/>Default is <code>null</code>.</p>
  148. </div>
  149. </div>
  150. <div class="member">
  151. <h3 class="name" id="wireframe" translate="no">.<a href="#wireframe">wireframe</a><span class="type-signature"> : boolean</span> </h3>
  152. <div class="description">
  153. <p>Renders the geometry as a wireframe.<br/>Default is <code>false</code>.</p>
  154. </div>
  155. </div>
  156. <div class="member">
  157. <h3 class="name" id="wireframeLinecap" translate="no">.<a href="#wireframeLinecap">wireframeLinecap</a><span class="type-signature"> : 'round' | 'bevel' | 'miter'</span> </h3>
  158. <div class="description">
  159. <p>Defines appearance of wireframe ends.</p>
  160. <p>Can only be used with <a href="SVGRenderer.html">SVGRenderer</a>.<br/>Default is <code>'round'</code>.</p>
  161. </div>
  162. </div>
  163. <div class="member">
  164. <h3 class="name" id="wireframeLinejoin" translate="no">.<a href="#wireframeLinejoin">wireframeLinejoin</a><span class="type-signature"> : 'round' | 'bevel' | 'miter'</span> </h3>
  165. <div class="description">
  166. <p>Defines appearance of wireframe joints.</p>
  167. <p>Can only be used with <a href="SVGRenderer.html">SVGRenderer</a>.<br/>Default is <code>'round'</code>.</p>
  168. </div>
  169. </div>
  170. <div class="member">
  171. <h3 class="name" id="wireframeLinewidth" translate="no">.<a href="#wireframeLinewidth">wireframeLinewidth</a><span class="type-signature"> : number</span> </h3>
  172. <div class="description">
  173. <p>Controls the thickness of the wireframe.</p>
  174. <p>Can only be used with <a href="SVGRenderer.html">SVGRenderer</a>.<br/>Default is <code>1</code>.</p>
  175. </div>
  176. </div>
  177. <h2 class="subsection-title">Source</h2>
  178. <p>
  179. <a href="https://github.com/mrdoob/three.js/blob/master/src/materials/MeshBasicMaterial.js" target="_blank" rel="noopener" translate="no">src/materials/MeshBasicMaterial.js</a>
  180. </p>
  181. </article>
  182. </section>
  183. <script src="../scripts/linenumber.js"></script>
  184. <script src="../scripts/page.js"></script>
  185. </body>
  186. </html>
粤ICP备19079148号