MeshBasicMaterial.html 10 KB

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