RectAreaLightUniformsLib.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>RectAreaLightUniformsLib - 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. <h1 translate="no">RectAreaLightUniformsLib</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>This class is only relevant when using <a href="RectAreaLight.html">RectAreaLight</a> with <a href="WebGLRenderer.html">WebGLRenderer</a>.</p>
  16. <p>Before rect area lights can be used, the internal uniform library of the renderer must be
  17. enhanced with the following code.</p></div>
  18. <h2>Code Example</h2>
  19. <div translate="no"><pre><code class="language-js">RectAreaLightUniformsLib.init();
  20. </code></pre></div>
  21. </header>
  22. <article>
  23. <h2 class="subsection-title">Import</h2>
  24. <p><span translate="no">RectAreaLightUniformsLib</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>
  25. <pre><code class="language-js">import { RectAreaLightUniformsLib } from 'three/addons/lights/RectAreaLightUniformsLib.js';</code></pre>
  26. <div class="container-overview">
  27. <div class="method">
  28. </div>
  29. </div>
  30. <h2 class="subsection-title">Static Methods</h2>
  31. <h3 class="name name-method" id=".init" translate="no">.<a href="#.init">init</a><span class="signature">()</span> </h3>
  32. <div class="method">
  33. <div class="description">
  34. <p>Inits the uniform library required when using rect area lights.</p>
  35. </div>
  36. </div>
  37. <h2 class="subsection-title">Source</h2>
  38. <p>
  39. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/lights/RectAreaLightUniformsLib.js" translate="no" target="_blank" rel="noopener">examples/jsm/lights/RectAreaLightUniformsLib.js</a>
  40. </p>
  41. </article>
  42. </section>
  43. <script src="../scripts/linenumber.js"></script>
  44. <script src="../scripts/page.js"></script>
  45. </body>
  46. </html>
粤ICP备19079148号