TiledLighting.html 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>TiledLighting - 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="Lighting.html">Lighting</a> → </p>
  13. <h1 translate="no">TiledLighting</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A custom lighting implementation based on Tiled-Lighting that overwrites the default
  17. implementation in <a href="WebGPURenderer.html">WebGPURenderer</a>.</p></div>
  18. <h2>Code Example</h2>
  19. <div translate="no"><pre><code class="language-js">const lighting = new TiledLighting();
  20. renderer.lighting = lighting; // set lighting system
  21. </code></pre></div>
  22. </header>
  23. <article>
  24. <h2 class="subsection-title">Import</h2>
  25. <p><span translate="no">TiledLighting</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>
  26. <pre><code class="language-js">import { TiledLighting } from 'three/addons/lighting/TiledLighting.js';</code></pre>
  27. <div class="container-overview">
  28. <h2>Constructor</h2>
  29. <h3 class="name name-method" id="TiledLighting" translate="no">new <a href="#TiledLighting">TiledLighting</a><span class="signature">()</span> </h3>
  30. <div class="method">
  31. <div class="description">
  32. <p>Constructs a new lighting system.</p>
  33. </div>
  34. </div>
  35. </div>
  36. <h2 class="subsection-title">Classes</h2>
  37. <dl>
  38. <dt><a href="TiledLighting.html">TiledLighting</a></dt>
  39. <dd></dd>
  40. </dl>
  41. <h2 class="subsection-title">Methods</h2>
  42. <h3 class="name name-method" id="createNode" translate="no">.<a href="#createNode">createNode</a><span class="signature">( lights : <span class="param-type">Array.&lt;<a href="Light.html">Light</a>></span> )</span><span class="type-signature"> : <a href="TiledLightsNode.html">TiledLightsNode</a></span> </h3>
  43. <div class="method">
  44. <div class="description">
  45. <p>Creates a new tiled lights node for the given array of lights.</p>
  46. <p>This method is called internally by the renderer and must be overwritten by
  47. all custom lighting implementations.</p>
  48. </div>
  49. <table class="params">
  50. <tbody>
  51. <tr>
  52. <td class="name">
  53. <strong>lights</strong>
  54. </td>
  55. <td class="description last">
  56. <p>The render object.</p>
  57. </td>
  58. </tr>
  59. </tbody>
  60. </table>
  61. <dl class="details">
  62. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Lighting.html#createNode">Lighting#createNode</a></dt>
  63. </dl>
  64. <dl class="details">
  65. <dt class="tag-returns"><strong>Returns:</strong> The tiled lights node.</dt>
  66. </dl>
  67. </div>
  68. <h2 class="subsection-title">Source</h2>
  69. <p>
  70. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/lighting/TiledLighting.js" translate="no" target="_blank" rel="noopener">examples/jsm/lighting/TiledLighting.js</a>
  71. </p>
  72. </article>
  73. </section>
  74. <script src="../scripts/linenumber.js"></script>
  75. <script src="../scripts/page.js"></script>
  76. </body>
  77. </html>
粤ICP备19079148号