MeshPhongNodeMaterial.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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"><code>parameters</code></td>
  30. <td class="description last"><p>The configuration parameter.</p></td>
  31. </tr>
  32. </tbody>
  33. </table>
  34. </div>
  35. </div>
  36. <h2 class="subsection-title">Properties</h2>
  37. <div class="member">
  38. <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>
  39. <div class="description">
  40. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  41. </div>
  42. </div>
  43. <div class="member">
  44. <h3 class="name" id="lights" translate="no">.<a href="#lights">lights</a><span class="type-signature"> : boolean</span> </h3>
  45. <div class="description">
  46. <p>Set to <code>true</code> because phong materials react on lights.<br/>Default is <code>true</code>.</p>
  47. </div>
  48. <dl class="details">
  49. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeMaterial.html#lights">NodeMaterial#lights</a></dt>
  50. </dl>
  51. </div>
  52. <div class="member">
  53. <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>
  54. <div class="description">
  55. <p>The shininess of phong materials is by default inferred from the <code>shininess</code>
  56. property. This node property allows to overwrite the default
  57. and define the shininess with a node instead.</p>
  58. <p>If you don't want to overwrite the shininess but modify the existing
  59. value instead, use <a href="TSL.html#materialShininess">materialShininess</a>.<br/>Default is <code>null</code>.</p>
  60. </div>
  61. </div>
  62. <div class="member">
  63. <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>
  64. <div class="description">
  65. <p>The specular color of phong materials is by default inferred from the
  66. <code>specular</code> property. This node property allows to overwrite the default
  67. and define the specular color with a node instead.</p>
  68. <p>If you don't want to overwrite the specular color but modify the existing
  69. value instead, use <a href="TSL.html#materialSpecular">materialSpecular</a>.<br/>Default is <code>null</code>.</p>
  70. </div>
  71. </div>
  72. <h2 class="subsection-title">Methods</h2>
  73. <h3 class="name name-method" id="setupEnvironment" translate="no">.<a href="#setupEnvironment">setupEnvironment</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : <a href="BasicEnvironmentNode.html">BasicEnvironmentNode</a>.&lt;vec3></span> </h3>
  74. <div class="method">
  75. <div class="description">
  76. <p>Overwritten since this type of material uses <a href="BasicEnvironmentNode.html">BasicEnvironmentNode</a>
  77. to implement the default environment mapping.</p>
  78. </div>
  79. <table class="params">
  80. <tbody>
  81. <tr>
  82. <td class="name"><code>builder</code></td>
  83. <td class="description last"><p>The current node builder.</p></td>
  84. </tr>
  85. </tbody>
  86. </table>
  87. <dl class="details">
  88. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeMaterial.html#setupEnvironment">NodeMaterial#setupEnvironment</a></dt>
  89. </dl>
  90. <dl class="details">
  91. <dt class="tag-returns"><strong>Returns:</strong> The environment node.</dt>
  92. </dl>
  93. </div>
  94. <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>
  95. <div class="method">
  96. <div class="description">
  97. <p>Setups the lighting model.</p>
  98. </div>
  99. <dl class="details">
  100. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeMaterial.html#setupLightingModel">NodeMaterial#setupLightingModel</a></dt>
  101. </dl>
  102. <dl class="details">
  103. <dt class="tag-returns"><strong>Returns:</strong> The lighting model.</dt>
  104. </dl>
  105. </div>
  106. <h3 class="name name-method" id="setupVariants" translate="no">.<a href="#setupVariants">setupVariants</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span> </h3>
  107. <div class="method">
  108. <div class="description">
  109. <p>Setups the phong specific node variables.</p>
  110. </div>
  111. <table class="params">
  112. <tbody>
  113. <tr>
  114. <td class="name"><code>builder</code></td>
  115. <td class="description last"><p>The current node builder.</p></td>
  116. </tr>
  117. </tbody>
  118. </table>
  119. <dl class="details">
  120. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="NodeMaterial.html#setupVariants">NodeMaterial#setupVariants</a></dt>
  121. </dl>
  122. </div>
  123. <h2 class="subsection-title">Source</h2>
  124. <p>
  125. <a href="https://github.com/mrdoob/three.js/blob/master/src/materials/nodes/MeshPhongNodeMaterial.js" target="_blank" rel="noopener" translate="no">src/materials/nodes/MeshPhongNodeMaterial.js</a>
  126. </p>
  127. </article>
  128. </section>
  129. <script src="../scripts/linenumber.js"></script>
  130. <script src="../scripts/page.js"></script>
  131. </body>
  132. </html>
粤ICP备19079148号