| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>LightProbe - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Light.html">Light</a> → </p>
- <h1 translate="no">LightProbe</h1>
- <section>
- <header>
- <div class="class-description"><p>Light probes are an alternative way of adding light to a 3D scene. Unlike
- classical light sources (e.g. directional, point or spot lights), light
- probes do not emit light. Instead they store information about light
- passing through 3D space. During rendering, the light that hits a 3D
- object is approximated by using the data from the light probe.</p>
- <p>Light probes are usually created from (radiance) environment maps. The
- class <a href="LightProbeGenerator.html">LightProbeGenerator</a> can be used to create light probes from
- cube textures or render targets. However, light estimation data could also
- be provided in other forms e.g. by WebXR. This enables the rendering of
- augmented reality content that reacts to real world lighting.</p>
- <p>The current probe implementation in three.js supports so-called diffuse
- light probes. This type of light probe is functionally equivalent to an
- irradiance environment map.</p></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="LightProbe" translate="no">new <a href="#LightProbe">LightProbe</a><span class="signature">( sh : <span class="param-type">SphericalHarmonics3</span>, intensity : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new light probe.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>sh</code></td>
- <td class="description last"><p>The spherical harmonics which represents encoded lighting information.</p></td>
- </tr>
- <tr>
- <td class="name"><code>intensity</code></td>
- <td class="description last"><p>The light's strength/intensity.<br/>Default is <code>1</code>.</p></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <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>
- <div class="description">
- <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="sh" translate="no">.<a href="#sh">sh</a><span class="type-signature"> : <a href="SphericalHarmonics3.html">SphericalHarmonics3</a></span> </h3>
- <div class="description">
- <p>A light probe uses spherical harmonics to encode lighting information.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <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>
- <div class="method">
- <div class="description">
- <p>Deserializes the light prove from the given JSON.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>json</code></td>
- <td class="description last"><p>The JSON holding the serialized light probe.</p></td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> A reference to this light probe.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/lights/LightProbe.js" target="_blank" rel="noopener" translate="no">src/lights/LightProbe.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|