TiledLighting.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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">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;Light></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"><code>lights</code></td>
  53. <td class="description last"><p>The render object.</p></td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. <dl class="details">
  58. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Lighting.html#createNode">Lighting#createNode</a></dt>
  59. </dl>
  60. <dl class="details">
  61. <dt class="tag-returns"><strong>Returns:</strong> The tiled lights node.</dt>
  62. </dl>
  63. </div>
  64. <h2 class="subsection-title">Source</h2>
  65. <p>
  66. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/lighting/TiledLighting.js" target="_blank" rel="noopener" translate="no">examples/jsm/lighting/TiledLighting.js</a>
  67. </p>
  68. </article>
  69. </section>
  70. <script src="../scripts/linenumber.js"></script>
  71. <script src="../scripts/page.js"></script>
  72. </body>
  73. </html>
粤ICP备19079148号