LightProbe.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LightProbe - 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="Light.html">Light</a> → </p>
  13. <h1 translate="no">LightProbe</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Light probes are an alternative way of adding light to a 3D scene. Unlike
  17. classical light sources (e.g. directional, point or spot lights), light
  18. probes do not emit light. Instead they store information about light
  19. passing through 3D space. During rendering, the light that hits a 3D
  20. object is approximated by using the data from the light probe.</p>
  21. <p>Light probes are usually created from (radiance) environment maps. The
  22. class <a href="LightProbeGenerator.html">LightProbeGenerator</a> can be used to create light probes from
  23. cube textures or render targets. However, light estimation data could also
  24. be provided in other forms e.g. by WebXR. This enables the rendering of
  25. augmented reality content that reacts to real world lighting.</p>
  26. <p>The current probe implementation in three.js supports so-called diffuse
  27. light probes. This type of light probe is functionally equivalent to an
  28. irradiance environment map.</p></div>
  29. </header>
  30. <article>
  31. <div class="container-overview">
  32. <h2>Constructor</h2>
  33. <h3 class="name name-method" id="LightProbe" translate="no">new <a href="#LightProbe">LightProbe</a><span class="signature">( sh : <span class="param-type"><a href="SphericalHarmonics3.html">SphericalHarmonics3</a></span>, intensity : <span class="param-type">number</span> )</span> </h3>
  34. <div class="method">
  35. <div class="description">
  36. <p>Constructs a new light probe.</p>
  37. </div>
  38. <table class="params">
  39. <tbody>
  40. <tr>
  41. <td class="name">
  42. <strong>sh</strong>
  43. </td>
  44. <td class="description last">
  45. <p>The spherical harmonics which represents encoded lighting information.</p>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td class="name">
  50. <strong>intensity</strong>
  51. </td>
  52. <td class="description last">
  53. <p>The light's strength/intensity.</p>
  54. <p>Default is <code>1</code>.</p>
  55. </td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. </div>
  60. </div>
  61. <h2 class="subsection-title">Properties</h2>
  62. <div class="member">
  63. <h3 class="name" id="isLightProbe" translate="no">.<a href="#isLightProbe">isLightProbe</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  64. <div class="description">
  65. <p>This flag can be used for type testing.</p>
  66. <p>Default is <code>true</code>.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="sh" translate="no">.<a href="#sh">sh</a><span class="type-signature"> : <a href="SphericalHarmonics3.html">SphericalHarmonics3</a></span> </h3>
  71. <div class="description">
  72. <p>A light probe uses spherical harmonics to encode lighting information.</p>
  73. </div>
  74. </div>
  75. <h2 class="subsection-title">Methods</h2>
  76. <h3 class="name name-method" id="fromJSON" translate="no">.<a href="#fromJSON">fromJSON</a><span class="signature">( json : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="LightProbe.html">LightProbe</a></span> </h3>
  77. <div class="method">
  78. <div class="description">
  79. <p>Deserializes the light prove from the given JSON.</p>
  80. </div>
  81. <table class="params">
  82. <tbody>
  83. <tr>
  84. <td class="name">
  85. <strong>json</strong>
  86. </td>
  87. <td class="description last">
  88. <p>The JSON holding the serialized light probe.</p>
  89. </td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. <dl class="details">
  94. <dt class="tag-returns"><strong>Returns:</strong> A reference to this light probe.</dt>
  95. </dl>
  96. </div>
  97. <h2 class="subsection-title">Source</h2>
  98. <p>
  99. <a href="https://github.com/mrdoob/three.js/blob/master/src/lights/LightProbe.js" translate="no" target="_blank" rel="noopener">src/lights/LightProbe.js</a>
  100. </p>
  101. </article>
  102. </section>
  103. <script src="../scripts/linenumber.js"></script>
  104. <script src="../scripts/page.js"></script>
  105. </body>
  106. </html>
粤ICP备19079148号