TiledLightsNode.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>TiledLightsNode - 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">TiledLightsNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A custom version of <code>LightsNode</code> implementing tiled lighting. This node is used in
  17. <a href="TiledLighting.html">TiledLighting</a> to overwrite the renderer's default lighting with
  18. a custom implementation.</p></div>
  19. </header>
  20. <article>
  21. <h2 class="subsection-title">Import</h2>
  22. <p><span translate="no">TiledLightsNode</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>
  23. <pre><code class="language-js">import { tiledLights } from 'three/addons/tsl/lighting/TiledLightsNode.js';</code></pre>
  24. <div class="container-overview">
  25. <h2>Constructor</h2>
  26. <h3 class="name name-method" id="TiledLightsNode" translate="no">new <a href="#TiledLightsNode">TiledLightsNode</a><span class="signature">( maxLights : <span class="param-type">number</span>, tileSize : <span class="param-type">number</span> )</span> </h3>
  27. <div class="method">
  28. <div class="description">
  29. <p>Constructs a new tiled lights node.</p>
  30. </div>
  31. <table class="params">
  32. <tbody>
  33. <tr>
  34. <td class="name">
  35. <strong>maxLights</strong>
  36. </td>
  37. <td class="description last">
  38. <p>The maximum number of lights.</p>
  39. <p>Default is <code>1024</code>.</p>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td class="name">
  44. <strong>tileSize</strong>
  45. </td>
  46. <td class="description last">
  47. <p>The tile size.</p>
  48. <p>Default is <code>32</code>.</p>
  49. </td>
  50. </tr>
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. <h2 class="subsection-title">Properties</h2>
  56. <div class="member">
  57. <h3 class="name" id="maxLights" translate="no">.<a href="#maxLights">maxLights</a><span class="type-signature"> : number</span> </h3>
  58. <div class="description">
  59. <p>The maximum number of lights.</p>
  60. <p>Default is <code>1024</code>.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <h3 class="name" id="tileSize" translate="no">.<a href="#tileSize">tileSize</a><span class="type-signature"> : number</span> </h3>
  65. <div class="description">
  66. <p>The tile size.</p>
  67. <p>Default is <code>32</code>.</p>
  68. </div>
  69. </div>
  70. <h2 class="subsection-title">Source</h2>
  71. <p>
  72. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/lighting/TiledLightsNode.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/lighting/TiledLightsNode.js</a>
  73. </p>
  74. </article>
  75. </section>
  76. <script src="../scripts/linenumber.js"></script>
  77. <script src="../scripts/page.js"></script>
  78. </body>
  79. </html>
粤ICP备19079148号