LightProbeGenerator.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LightProbeGenerator - 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">LightProbeGenerator</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>Utility class for creating instances of <a href="LightProbe.html">LightProbe</a>.</p></div>
  16. </header>
  17. <article>
  18. <h2 class="subsection-title">Import</h2>
  19. <p><span translate="no">LightProbeGenerator</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  20. <pre><code class="language-js">import { LightProbeGenerator } from 'three/addons/lights/LightProbeGenerator.js';</code></pre>
  21. <div class="container-overview">
  22. <div class="method">
  23. </div>
  24. </div>
  25. <h2 class="subsection-title">Static Methods</h2>
  26. <h3 class="name name-method" id=".fromCubeRenderTarget" translate="no">.<a href="#.fromCubeRenderTarget">fromCubeRenderTarget</a><span class="signature">( renderer : <span class="param-type">WebGPURenderer | WebGLRenderer</span>, cubeRenderTarget : <span class="param-type">CubeRenderTarget | WebGLCubeRenderTarget</span> )</span><span class="type-signature"> : Promise.&lt;<a href="LightProbe.html">LightProbe</a>></span> <span class="type-signature">(async) </span></h3>
  27. <div class="method">
  28. <div class="description">
  29. <p>Creates a light probe from the given (radiance) environment map.
  30. The method expects that the environment map is represented as a cube render target.</p>
  31. <p>The cube render target must be in RGBA so <code>cubeRenderTarget.texture.format</code> must be
  32. set to <a href="global.html#RGBAFormat">RGBAFormat</a>.</p>
  33. </div>
  34. <table class="params">
  35. <tbody>
  36. <tr>
  37. <td class="name"><code>renderer</code></td>
  38. <td class="description last"><p>The renderer.</p></td>
  39. </tr>
  40. <tr>
  41. <td class="name"><code>cubeRenderTarget</code></td>
  42. <td class="description last"><p>The environment map.</p></td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. <dl class="details">
  47. <dt class="tag-returns"><strong>Returns:</strong> A Promise that resolves with the created light probe.</dt>
  48. </dl>
  49. </div>
  50. <h3 class="name name-method" id=".fromCubeTexture" translate="no">.<a href="#.fromCubeTexture">fromCubeTexture</a><span class="signature">( cubeTexture : <span class="param-type">CubeTexture</span> )</span><span class="type-signature"> : <a href="LightProbe.html">LightProbe</a></span> </h3>
  51. <div class="method">
  52. <div class="description">
  53. <p>Creates a light probe from the given (radiance) environment map.
  54. The method expects that the environment map is represented as a cube texture.</p>
  55. </div>
  56. <table class="params">
  57. <tbody>
  58. <tr>
  59. <td class="name"><code>cubeTexture</code></td>
  60. <td class="description last"><p>The environment map.</p></td>
  61. </tr>
  62. </tbody>
  63. </table>
  64. <dl class="details">
  65. <dt class="tag-returns"><strong>Returns:</strong> The created light probe.</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/lights/LightProbeGenerator.js" target="_blank" rel="noopener" translate="no">examples/jsm/lights/LightProbeGenerator.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号