DynamicLightsNode.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>DynamicLightsNode - 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="Node.html">Node</a> → <a href="LightsNode.html">LightsNode</a> → </p>
  13. <h1 translate="no">DynamicLightsNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A custom version of <code>LightsNode</code> that batches supported analytic lights into
  17. uniform arrays and loops.</p>
  18. <p>Unsupported lights, node lights, shadow-casting lights, and projected spot
  19. lights keep the default per-light path.</p></div>
  20. </header>
  21. <article>
  22. <h2 class="subsection-title">Import</h2>
  23. <p><span translate="no">DynamicLightsNode</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
  24. <pre><code class="language-js">import { DynamicLightsNode } from 'three/addons/tsl/lighting/DynamicLightsNode.js';</code></pre>
  25. <div class="container-overview">
  26. <h2>Constructor</h2>
  27. <h3 class="name name-method" id="DynamicLightsNode" translate="no">new <a href="#DynamicLightsNode">DynamicLightsNode</a><span class="signature">( options : <span class="param-type">Object</span> )</span> </h3>
  28. <div class="method">
  29. <div class="description">
  30. <p>Constructs a new dynamic lights node.</p>
  31. </div>
  32. <table class="params">
  33. <tbody>
  34. <tr>
  35. <td class="name">
  36. <strong translate="no">options</strong>
  37. </td>
  38. <td class="description last">
  39. <p>Dynamic lighting configuration.</p>
  40. <p>Default is <code>{}</code>.</p>
  41. <table class="params">
  42. <tbody>
  43. <tr>
  44. <td class="name">
  45. <strong translate="no">maxDirectionalLights</strong>
  46. </td>
  47. <td class="description last">
  48. <p>Maximum number of batched directional lights.</p>
  49. <p>Default is <code>8</code>.</p>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td class="name">
  54. <strong translate="no">maxPointLights</strong>
  55. </td>
  56. <td class="description last">
  57. <p>Maximum number of batched point lights.</p>
  58. <p>Default is <code>16</code>.</p>
  59. </td>
  60. </tr>
  61. <tr>
  62. <td class="name">
  63. <strong translate="no">maxSpotLights</strong>
  64. </td>
  65. <td class="description last">
  66. <p>Maximum number of batched spot lights.</p>
  67. <p>Default is <code>16</code>.</p>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td class="name">
  72. <strong translate="no">maxHemisphereLights</strong>
  73. </td>
  74. <td class="description last">
  75. <p>Maximum number of batched hemisphere lights.</p>
  76. <p>Default is <code>4</code>.</p>
  77. </td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. </td>
  82. </tr>
  83. </tbody>
  84. </table>
  85. </div>
  86. </div>
  87. <h2 class="subsection-title">Source</h2>
  88. <p>
  89. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/lighting/DynamicLightsNode.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/lighting/DynamicLightsNode.js</a>
  90. </p>
  91. </article>
  92. </section>
  93. <script src="../scripts/linenumber.js"></script>
  94. <script src="../scripts/page.js"></script>
  95. </body>
  96. </html>
粤ICP备19079148号