XREstimatedLight.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>XREstimatedLight - 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="Object3D.html">Object3D</a> → <a href="Group.html">Group</a> → </p>
  13. <h1 translate="no">XREstimatedLight</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This class can be used to represent the environmental light of
  17. a XR session. It relies on the WebXR Lighting Estimation API.</p></div>
  18. </header>
  19. <article>
  20. <h2 class="subsection-title">Import</h2>
  21. <p><span translate="no">XREstimatedLight</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>
  22. <pre><code class="language-js">import { XREstimatedLight } from 'three/addons/webxr/XREstimatedLight.js';</code></pre>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="XREstimatedLight" translate="no">new <a href="#XREstimatedLight">XREstimatedLight</a><span class="signature">( renderer : <span class="param-type"><a href="WebGLRenderer.html">WebGLRenderer</a></span>, environmentEstimation : <span class="param-type">boolean</span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new light.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name">
  34. <strong>renderer</strong>
  35. </td>
  36. <td class="description last">
  37. <p>The renderer.</p>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="name">
  42. <strong>environmentEstimation</strong>
  43. </td>
  44. <td class="description last">
  45. <p>Whether to use environment estimation or not.</p>
  46. <p>Default is <code>true</code>.</p>
  47. </td>
  48. </tr>
  49. </tbody>
  50. </table>
  51. </div>
  52. </div>
  53. <h2 class="subsection-title">Classes</h2>
  54. <dl>
  55. <dt><a href="XREstimatedLight.html">XREstimatedLight</a></dt>
  56. <dd></dd>
  57. </dl>
  58. <h2 class="subsection-title">Properties</h2>
  59. <div class="member">
  60. <h3 class="name" id="directionalLight" translate="no">.<a href="#directionalLight">directionalLight</a><span class="type-signature"> : <a href="DirectionalLight.html">DirectionalLight</a></span> </h3>
  61. <div class="description">
  62. <p>Represents the primary light from the XR environment.</p>
  63. </div>
  64. </div>
  65. <div class="member">
  66. <h3 class="name" id="environment" translate="no">.<a href="#environment">environment</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  67. <div class="description">
  68. <p>Will be set to a cube map in the SessionLightProbe if environment estimation is
  69. available and requested.</p>
  70. <p>Default is <code>null</code>.</p>
  71. </div>
  72. </div>
  73. <div class="member">
  74. <h3 class="name" id="lightProbe" translate="no">.<a href="#lightProbe">lightProbe</a><span class="type-signature"> : <a href="LightProbe.html">LightProbe</a></span> </h3>
  75. <div class="description">
  76. <p>The light probe that represents the estimated light.</p>
  77. </div>
  78. </div>
  79. <h2 class="subsection-title">Methods</h2>
  80. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  81. <div class="method">
  82. <div class="description">
  83. <p>Frees the GPU-related resources allocated by this instance. Call this
  84. method whenever this instance is no longer used in your app.</p>
  85. </div>
  86. </div>
  87. <h2 class="subsection-title">Source</h2>
  88. <p>
  89. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/XREstimatedLight.js" translate="no" target="_blank" rel="noopener">examples/jsm/webxr/XREstimatedLight.js</a>
  90. </p>
  91. </article>
  92. </section>
  93. <script src="../scripts/linenumber.js"></script>
  94. <script src="../scripts/page.js"></script>
  95. </body>
  96. </html>
粤ICP备19079148号