MeshMatcapMaterial.html 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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"><code>parameters</code></td>
  36. <td class="description last"><p>An object with one or more properties
  37. defining the material's appearance. Any property of the material
  38. (including any property from inherited materials) can be passed
  39. in here. Color values can be passed any type of value accepted
  40. by <a href="Color.html#set">Color#set</a>.</p></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.<br/>Default is <code>null</code>.</p>
  57. </div>
  58. </div>
  59. <div class="member">
  60. <h3 class="name" id="bumpMap" translate="no">.<a href="#bumpMap">bumpMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  61. <div class="description">
  62. <p>The texture to create a bump map. The black and white values map to the
  63. perceived depth in relation to the lights. Bump doesn't actually affect
  64. the geometry of the object, only the lighting. If a normal map is defined
  65. this will be ignored.<br/>Default is <code>null</code>.</p>
  66. </div>
  67. </div>
  68. <div class="member">
  69. <h3 class="name" id="bumpScale" translate="no">.<a href="#bumpScale">bumpScale</a><span class="type-signature"> : number</span> </h3>
  70. <div class="description">
  71. <p>How much the bump map affects the material. Typical range is <code>[0,1]</code>.<br/>Default is <code>1</code>.</p>
  72. </div>
  73. </div>
  74. <div class="member">
  75. <h3 class="name" id="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : <a href="Color.html">Color</a></span> </h3>
  76. <div class="description">
  77. <p>Color of the material.<br/>Default is <code>(1,1,1)</code>.</p>
  78. </div>
  79. </div>
  80. <div class="member">
  81. <h3 class="name" id="displacementBias" translate="no">.<a href="#displacementBias">displacementBias</a><span class="type-signature"> : number</span> </h3>
  82. <div class="description">
  83. <p>The offset of the displacement map's values on the mesh's vertices.
  84. The bias is added to the scaled sample of the displacement map.
  85. Without a displacement map set, this value is not applied.<br/>Default is <code>0</code>.</p>
  86. </div>
  87. </div>
  88. <div class="member">
  89. <h3 class="name" id="displacementMap" translate="no">.<a href="#displacementMap">displacementMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  90. <div class="description">
  91. <p>The displacement map affects the position of the mesh's vertices. Unlike
  92. other maps which only affect the light and shade of the material the
  93. displaced vertices can cast shadows, block other objects, and otherwise
  94. act as real geometry. The displacement texture is an image where the value
  95. of each pixel (white being the highest) is mapped against, and
  96. repositions, the vertices of the mesh.<br/>Default is <code>null</code>.</p>
  97. </div>
  98. </div>
  99. <div class="member">
  100. <h3 class="name" id="displacementScale" translate="no">.<a href="#displacementScale">displacementScale</a><span class="type-signature"> : number</span> </h3>
  101. <div class="description">
  102. <p>How much the displacement map affects the mesh (where black is no
  103. displacement, and white is maximum displacement). Without a displacement
  104. map set, this value is not applied.<br/>Default is <code>0</code>.</p>
  105. </div>
  106. </div>
  107. <div class="member">
  108. <h3 class="name" id="flatShading" translate="no">.<a href="#flatShading">flatShading</a><span class="type-signature"> : boolean</span> </h3>
  109. <div class="description">
  110. <p>Whether the material is rendered with flat shading or not.<br/>Default is <code>false</code>.</p>
  111. </div>
  112. </div>
  113. <div class="member">
  114. <h3 class="name" id="fog" translate="no">.<a href="#fog">fog</a><span class="type-signature"> : boolean</span> </h3>
  115. <div class="description">
  116. <p>Whether the material is affected by fog or not.<br/>Default is <code>true</code>.</p>
  117. </div>
  118. </div>
  119. <div class="member">
  120. <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>
  121. <div class="description">
  122. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  123. </div>
  124. </div>
  125. <div class="member">
  126. <h3 class="name" id="map" translate="no">.<a href="#map">map</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  127. <div class="description">
  128. <p>The color map. May optionally include an alpha channel, typically combined
  129. with <a href="Material.html#transparent">Material#transparent</a> or <a href="Material.html#alphaTest">Material#alphaTest</a>. The texture map
  130. color is modulated by the diffuse <code>color</code>.<br/>Default is <code>null</code>.</p>
  131. </div>
  132. </div>
  133. <div class="member">
  134. <h3 class="name" id="matcap" translate="no">.<a href="#matcap">matcap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  135. <div class="description">
  136. <p>The matcap map.<br/>Default is <code>null</code>.</p>
  137. </div>
  138. </div>
  139. <div class="member">
  140. <h3 class="name" id="normalMap" translate="no">.<a href="#normalMap">normalMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  141. <div class="description">
  142. <p>The texture to create a normal map. The RGB values affect the surface
  143. normal for each pixel fragment and change the way the color is lit. Normal
  144. maps do not change the actual shape of the surface, only the lighting. In
  145. case the material has a normal map authored using the left handed
  146. convention, the <code>y</code> component of <code>normalScale</code> should be negated to compensate
  147. for the different handedness.<br/>Default is <code>null</code>.</p>
  148. </div>
  149. </div>
  150. <div class="member">
  151. <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>
  152. <div class="description">
  153. <p>The type of normal map.<br/>Default is <code>TangentSpaceNormalMap</code>.</p>
  154. </div>
  155. </div>
  156. <div class="member">
  157. <h3 class="name" id="normalScale" translate="no">.<a href="#normalScale">normalScale</a><span class="type-signature"> : <a href="Vector2.html">Vector2</a></span> </h3>
  158. <div class="description">
  159. <p>How much the normal map affects the material. Typical value range is <code>[0,1]</code>.<br/>Default is <code>(1,1)</code>.</p>
  160. </div>
  161. </div>
  162. <div class="member">
  163. <h3 class="name" id="wireframe" translate="no">.<a href="#wireframe">wireframe</a><span class="type-signature"> : boolean</span> </h3>
  164. <div class="description">
  165. <p>Renders the geometry as a wireframe.<br/>Default is <code>false</code>.</p>
  166. </div>
  167. </div>
  168. <div class="member">
  169. <h3 class="name" id="wireframeLinewidth" translate="no">.<a href="#wireframeLinewidth">wireframeLinewidth</a><span class="type-signature"> : number</span> </h3>
  170. <div class="description">
  171. <p>Controls the thickness of the wireframe.</p>
  172. <p>Can only be used with <a href="SVGRenderer.html">SVGRenderer</a>.<br/>Default is <code>1</code>.</p>
  173. </div>
  174. </div>
  175. <h2 class="subsection-title">Source</h2>
  176. <p>
  177. <a href="https://github.com/mrdoob/three.js/blob/master/src/materials/MeshMatcapMaterial.js" target="_blank" rel="noopener" translate="no">src/materials/MeshMatcapMaterial.js</a>
  178. </p>
  179. </article>
  180. </section>
  181. <script src="../scripts/linenumber.js"></script>
  182. <script src="../scripts/page.js"></script>
  183. </body>
  184. </html>
粤ICP备19079148号