MeshMatcapMaterial.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>MeshMatcapMaterial - 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">MeshMatcapMaterial</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This material is defined by a MatCap (or Lit Sphere) texture, which encodes the
  17. material color and shading.</p>
  18. <p><code>MeshMatcapMaterial</code> does not respond to lights since the matcap image file encodes
  19. baked lighting. It will cast a shadow onto an object that receives shadows
  20. (and shadow clipping works), but it will not self-shadow or receive
  21. shadows.</p></div>
  22. <iframe id="viewer" src="../scenes/material-browser.html#MeshMatcapMaterial"></iframe>
  23. </header>
  24. <article>
  25. <div class="container-overview">
  26. <h2>Constructor</h2>
  27. <h3 class="name name-method" id="MeshMatcapMaterial" translate="no">new <a href="#MeshMatcapMaterial">MeshMatcapMaterial</a><span class="signature">( parameters : <span class="param-type">Object</span> )</span> </h3>
  28. <div class="method">
  29. <div class="description">
  30. <p>Constructs a new mesh matcap material.</p>
  31. </div>
  32. <table class="params">
  33. <tbody>
  34. <tr>
  35. <td class="name">
  36. <strong>parameters</strong>
  37. </td>
  38. <td class="description last">
  39. <p>An object with one or more properties
  40. defining the material's appearance. Any property of the material
  41. (including any property from inherited materials) can be passed
  42. in here. Color values can be passed any type of value accepted
  43. by <a href="Color.html#set">Color#set</a>.</p>
  44. </td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. </div>
  49. </div>
  50. <h2 class="subsection-title">Properties</h2>
  51. <div class="member">
  52. <h3 class="name" id="alphaMap" translate="no">.<a href="#alphaMap">alphaMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  53. <div class="description">
  54. <p>The alpha map is a grayscale texture that controls the opacity across the
  55. surface (black: fully transparent; white: fully opaque).</p>
  56. <p>Only the color of the texture is used, ignoring the alpha channel if one
  57. exists. For RGB and RGBA textures, the renderer will use the green channel
  58. when sampling this texture due to the extra bit of precision provided for
  59. green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
  60. luminance/alpha textures will also still work as expected.</p>
  61. <p>Default is <code>null</code>.</p>
  62. </div>
  63. </div>
  64. <div class="member">
  65. <h3 class="name" id="bumpMap" translate="no">.<a href="#bumpMap">bumpMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  66. <div class="description">
  67. <p>The texture to create a bump map. The black and white values map to the
  68. perceived depth in relation to the lights. Bump doesn't actually affect
  69. the geometry of the object, only the lighting. If a normal map is defined
  70. this will be ignored.</p>
  71. <p>Default is <code>null</code>.</p>
  72. </div>
  73. </div>
  74. <div class="member">
  75. <h3 class="name" id="bumpScale" translate="no">.<a href="#bumpScale">bumpScale</a><span class="type-signature"> : number</span> </h3>
  76. <div class="description">
  77. <p>How much the bump map affects the material. Typical range is <code>[0,1]</code>.</p>
  78. <p>Default is <code>1</code>.</p>
  79. </div>
  80. </div>
  81. <div class="member">
  82. <h3 class="name" id="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : <a href="Color.html">Color</a></span> </h3>
  83. <div class="description">
  84. <p>Color of the material.</p>
  85. <p>Default is <code>(1,1,1)</code>.</p>
  86. </div>
  87. </div>
  88. <div class="member">
  89. <h3 class="name" id="displacementBias" translate="no">.<a href="#displacementBias">displacementBias</a><span class="type-signature"> : number</span> </h3>
  90. <div class="description">
  91. <p>The offset of the displacement map's values on the mesh's vertices.
  92. The bias is added to the scaled sample of the displacement map.
  93. Without a displacement map set, this value is not applied.</p>
  94. <p>Default is <code>0</code>.</p>
  95. </div>
  96. </div>
  97. <div class="member">
  98. <h3 class="name" id="displacementMap" translate="no">.<a href="#displacementMap">displacementMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  99. <div class="description">
  100. <p>The displacement map affects the position of the mesh's vertices. Unlike
  101. other maps which only affect the light and shade of the material the
  102. displaced vertices can cast shadows, block other objects, and otherwise
  103. act as real geometry. The displacement texture is an image where the value
  104. of each pixel (white being the highest) is mapped against, and
  105. repositions, the vertices of the mesh.</p>
  106. <p>Default is <code>null</code>.</p>
  107. </div>
  108. </div>
  109. <div class="member">
  110. <h3 class="name" id="displacementScale" translate="no">.<a href="#displacementScale">displacementScale</a><span class="type-signature"> : number</span> </h3>
  111. <div class="description">
  112. <p>How much the displacement map affects the mesh (where black is no
  113. displacement, and white is maximum displacement). Without a displacement
  114. map set, this value is not applied.</p>
  115. <p>Default is <code>0</code>.</p>
  116. </div>
  117. </div>
  118. <div class="member">
  119. <h3 class="name" id="flatShading" translate="no">.<a href="#flatShading">flatShading</a><span class="type-signature"> : boolean</span> </h3>
  120. <div class="description">
  121. <p>Whether the material is rendered with flat shading or not.</p>
  122. <p>Default is <code>false</code>.</p>
  123. </div>
  124. </div>
  125. <div class="member">
  126. <h3 class="name" id="fog" translate="no">.<a href="#fog">fog</a><span class="type-signature"> : boolean</span> </h3>
  127. <div class="description">
  128. <p>Whether the material is affected by fog or not.</p>
  129. <p>Default is <code>true</code>.</p>
  130. </div>
  131. </div>
  132. <div class="member">
  133. <h3 class="name" id="isMeshMatcapMaterial" translate="no">.<a href="#isMeshMatcapMaterial">isMeshMatcapMaterial</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  134. <div class="description">
  135. <p>This flag can be used for type testing.</p>
  136. <p>Default is <code>true</code>.</p>
  137. </div>
  138. </div>
  139. <div class="member">
  140. <h3 class="name" id="map" translate="no">.<a href="#map">map</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  141. <div class="description">
  142. <p>The color map. May optionally include an alpha channel, typically combined
  143. with <a href="Material.html#transparent">Material#transparent</a> or <a href="Material.html#alphaTest">Material#alphaTest</a>. The texture map
  144. color is modulated by the diffuse <code>color</code>.</p>
  145. <p>Default is <code>null</code>.</p>
  146. </div>
  147. </div>
  148. <div class="member">
  149. <h3 class="name" id="matcap" translate="no">.<a href="#matcap">matcap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  150. <div class="description">
  151. <p>The matcap map.</p>
  152. <p>Default is <code>null</code>.</p>
  153. </div>
  154. </div>
  155. <div class="member">
  156. <h3 class="name" id="normalMap" translate="no">.<a href="#normalMap">normalMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  157. <div class="description">
  158. <p>The texture to create a normal map. The RGB values affect the surface
  159. normal for each pixel fragment and change the way the color is lit. Normal
  160. maps do not change the actual shape of the surface, only the lighting. In
  161. case the material has a normal map authored using the left handed
  162. convention, the <code>y</code> component of <code>normalScale</code> should be negated to compensate
  163. for the different handedness.</p>
  164. <p>Default is <code>null</code>.</p>
  165. </div>
  166. </div>
  167. <div class="member">
  168. <h3 class="name" id="normalMapType" translate="no">.<a href="#normalMapType">normalMapType</a><span class="type-signature"> : <a href="global.html#TangentSpaceNormalMap">TangentSpaceNormalMap</a> | <a href="global.html#ObjectSpaceNormalMap">ObjectSpaceNormalMap</a></span> </h3>
  169. <div class="description">
  170. <p>The type of normal map.</p>
  171. <p>Default is <code>TangentSpaceNormalMap</code>.</p>
  172. </div>
  173. </div>
  174. <div class="member">
  175. <h3 class="name" id="normalScale" translate="no">.<a href="#normalScale">normalScale</a><span class="type-signature"> : <a href="Vector2.html">Vector2</a></span> </h3>
  176. <div class="description">
  177. <p>How much the normal map affects the material. Typical value range is <code>[0,1]</code>.</p>
  178. <p>Default is <code>(1,1)</code>.</p>
  179. </div>
  180. </div>
  181. <div class="member">
  182. <h3 class="name" id="wireframe" translate="no">.<a href="#wireframe">wireframe</a><span class="type-signature"> : boolean</span> </h3>
  183. <div class="description">
  184. <p>Renders the geometry as a wireframe.</p>
  185. <p>Default is <code>false</code>.</p>
  186. </div>
  187. </div>
  188. <div class="member">
  189. <h3 class="name" id="wireframeLinewidth" translate="no">.<a href="#wireframeLinewidth">wireframeLinewidth</a><span class="type-signature"> : number</span> </h3>
  190. <div class="description">
  191. <p>Controls the thickness of the wireframe.</p>
  192. <p>Can only be used with <a href="SVGRenderer.html">SVGRenderer</a>.</p>
  193. <p>Default is <code>1</code>.</p>
  194. </div>
  195. </div>
  196. <h2 class="subsection-title">Source</h2>
  197. <p>
  198. <a href="https://github.com/mrdoob/three.js/blob/master/src/materials/MeshMatcapMaterial.js" translate="no" target="_blank" rel="noopener">src/materials/MeshMatcapMaterial.js</a>
  199. </p>
  200. </article>
  201. </section>
  202. <script src="../scripts/linenumber.js"></script>
  203. <script src="../scripts/page.js"></script>
  204. </body>
  205. </html>
粤ICP备19079148号