MeshPhongNodeMaterial.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>MeshPhongNodeMaterial - 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> → <a href="NodeMaterial.html">NodeMaterial</a> → </p>
  13. <h1 translate="no">MeshPhongNodeMaterial</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Node material version of <a href="MeshPhongMaterial.html">MeshPhongMaterial</a>.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="MeshPhongNodeMaterial" translate="no">new <a href="#MeshPhongNodeMaterial">MeshPhongNodeMaterial</a><span class="signature">( parameters : <span class="param-type">Object</span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new mesh lambert node material.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name">
  30. <strong>parameters</strong>
  31. </td>
  32. <td class="description last">
  33. <p>The configuration parameter.</p>
  34. </td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. </div>
  40. <h2 class="subsection-title">Properties</h2>
  41. <div class="member">
  42. <h3 class="name" id="isMeshPhongNodeMaterial" translate="no">.<a href="#isMeshPhongNodeMaterial">isMeshPhongNodeMaterial</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  43. <div class="description">
  44. <p>This flag can be used for type testing.</p>
  45. <p>Default is <code>true</code>.</p>
  46. </div>
  47. </div>
  48. <div class="member">
  49. <h3 class="name" id="lights" translate="no">.<a href="#lights">lights</a><span class="type-signature"> : boolean</span> </h3>
  50. <div class="description">
  51. <p>Set to <code>true</code> because phong materials react on lights.</p>
  52. <p>Default is <code>true</code>.</p>
  53. </div>
  54. <dl class="details">
  55. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeMaterial.html#lights">NodeMaterial#lights</a></dt>
  56. </dl>
  57. </div>
  58. <div class="member">
  59. <h3 class="name" id="shininessNode" translate="no">.<a href="#shininessNode">shininessNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  60. <div class="description">
  61. <p>The shininess of phong materials is by default inferred from the <code>shininess</code>
  62. property. This node property allows to overwrite the default
  63. and define the shininess with a node instead.</p>
  64. <p>If you don't want to overwrite the shininess but modify the existing
  65. value instead, use <a href="TSL.html#materialShininess">materialShininess</a>.</p>
  66. <p>Default is <code>null</code>.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="specularNode" translate="no">.<a href="#specularNode">specularNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  71. <div class="description">
  72. <p>The specular color of phong materials is by default inferred from the
  73. <code>specular</code> property. This node property allows to overwrite the default
  74. and define the specular color with a node instead.</p>
  75. <p>If you don't want to overwrite the specular color but modify the existing
  76. value instead, use <a href="TSL.html#materialSpecular">materialSpecular</a>.</p>
  77. <p>Default is <code>null</code>.</p>
  78. </div>
  79. </div>
  80. <h2 class="subsection-title">Methods</h2>
  81. <h3 class="name name-method" id="setupEnvironment" translate="no">.<a href="#setupEnvironment">setupEnvironment</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : <a href="BasicEnvironmentNode.html">BasicEnvironmentNode</a>.&lt;vec3></span> </h3>
  82. <div class="method">
  83. <div class="description">
  84. <p>Overwritten since this type of material uses <a href="BasicEnvironmentNode.html">BasicEnvironmentNode</a>
  85. to implement the default environment mapping.</p>
  86. </div>
  87. <table class="params">
  88. <tbody>
  89. <tr>
  90. <td class="name">
  91. <strong>builder</strong>
  92. </td>
  93. <td class="description last">
  94. <p>The current node builder.</p>
  95. </td>
  96. </tr>
  97. </tbody>
  98. </table>
  99. <dl class="details">
  100. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeMaterial.html#setupEnvironment">NodeMaterial#setupEnvironment</a></dt>
  101. </dl>
  102. <dl class="details">
  103. <dt class="tag-returns"><strong>Returns:</strong> The environment node.</dt>
  104. </dl>
  105. </div>
  106. <h3 class="name name-method" id="setupLightingModel" translate="no">.<a href="#setupLightingModel">setupLightingModel</a><span class="signature">()</span><span class="type-signature"> : <a href="PhongLightingModel.html">PhongLightingModel</a></span> </h3>
  107. <div class="method">
  108. <div class="description">
  109. <p>Setups the lighting model.</p>
  110. </div>
  111. <dl class="details">
  112. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeMaterial.html#setupLightingModel">NodeMaterial#setupLightingModel</a></dt>
  113. </dl>
  114. <dl class="details">
  115. <dt class="tag-returns"><strong>Returns:</strong> The lighting model.</dt>
  116. </dl>
  117. </div>
  118. <h3 class="name name-method" id="setupVariants" translate="no">.<a href="#setupVariants">setupVariants</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span> </h3>
  119. <div class="method">
  120. <div class="description">
  121. <p>Setups the phong specific node variables.</p>
  122. </div>
  123. <table class="params">
  124. <tbody>
  125. <tr>
  126. <td class="name">
  127. <strong>builder</strong>
  128. </td>
  129. <td class="description last">
  130. <p>The current node builder.</p>
  131. </td>
  132. </tr>
  133. </tbody>
  134. </table>
  135. <dl class="details">
  136. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeMaterial.html#setupVariants">NodeMaterial#setupVariants</a></dt>
  137. </dl>
  138. </div>
  139. <h2 class="subsection-title">Source</h2>
  140. <p>
  141. <a href="https://github.com/mrdoob/three.js/blob/master/src/materials/nodes/MeshPhongNodeMaterial.js" translate="no" target="_blank" rel="noopener">src/materials/nodes/MeshPhongNodeMaterial.js</a>
  142. </p>
  143. </article>
  144. </section>
  145. <script src="../scripts/linenumber.js"></script>
  146. <script src="../scripts/page.js"></script>
  147. </body>
  148. </html>
粤ICP备19079148号