PhongLightingModel.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>PhongLightingModel - 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="LightingModel.html">LightingModel</a> → <a href="BasicLightingModel.html">BasicLightingModel</a> → </p>
  13. <h1 translate="no">PhongLightingModel</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Represents the lighting model for a phong material. Used in <a href="MeshPhongNodeMaterial.html">MeshPhongNodeMaterial</a>.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="PhongLightingModel" translate="no">new <a href="#PhongLightingModel">PhongLightingModel</a><span class="signature">( specular : <span class="param-type">boolean</span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new phong lighting model.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name">
  30. <strong>specular</strong>
  31. </td>
  32. <td class="description last">
  33. <p>Whether specular is supported or not.</p>
  34. <p>Default is <code>true</code>.</p>
  35. </td>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </div>
  40. </div>
  41. <h2 class="subsection-title">Properties</h2>
  42. <div class="member">
  43. <h3 class="name" id="specular" translate="no">.<a href="#specular">specular</a><span class="type-signature"> : boolean</span> </h3>
  44. <div class="description">
  45. <p>Whether specular is supported or not. Set this to <code>false</code> if you are
  46. looking for a Lambert-like material meaning a material for non-shiny
  47. surfaces, without specular highlights.</p>
  48. <p>Default is <code>true</code>.</p>
  49. </div>
  50. </div>
  51. <h2 class="subsection-title">Methods</h2>
  52. <h3 class="name name-method" id="direct" translate="no">.<a href="#direct">direct</a><span class="signature">( lightData : <span class="param-type">Object</span> )</span> </h3>
  53. <div class="method">
  54. <div class="description">
  55. <p>Implements the direct lighting. The specular portion is optional an can be controlled
  56. with the <a href="PhongLightingModel.html#specular">PhongLightingModel#specular</a> flag.</p>
  57. </div>
  58. <table class="params">
  59. <tbody>
  60. <tr>
  61. <td class="name">
  62. <strong>lightData</strong>
  63. </td>
  64. <td class="description last">
  65. <p>The light data.</p>
  66. </td>
  67. </tr>
  68. </tbody>
  69. </table>
  70. <dl class="details">
  71. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="BasicLightingModel.html#direct">BasicLightingModel#direct</a></dt>
  72. </dl>
  73. </div>
  74. <h3 class="name name-method" id="indirect" translate="no">.<a href="#indirect">indirect</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span> </h3>
  75. <div class="method">
  76. <div class="description">
  77. <p>Implements the indirect lighting.</p>
  78. </div>
  79. <table class="params">
  80. <tbody>
  81. <tr>
  82. <td class="name">
  83. <strong>builder</strong>
  84. </td>
  85. <td class="description last">
  86. <p>The current node builder.</p>
  87. </td>
  88. </tr>
  89. </tbody>
  90. </table>
  91. <dl class="details">
  92. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="BasicLightingModel.html#indirect">BasicLightingModel#indirect</a></dt>
  93. </dl>
  94. </div>
  95. <h2 class="subsection-title">Source</h2>
  96. <p>
  97. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/functions/PhongLightingModel.js" translate="no" target="_blank" rel="noopener">src/nodes/functions/PhongLightingModel.js</a>
  98. </p>
  99. </article>
  100. </section>
  101. <script src="../scripts/linenumber.js"></script>
  102. <script src="../scripts/page.js"></script>
  103. </body>
  104. </html>
粤ICP备19079148号