| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>DirectionalLightHelper - 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> → </p>
- <h1 translate="no">DirectionalLightHelper</h1>
- <section>
- <header>
- <div class="class-description"><p>Helper object to assist with visualizing a <a href="DirectionalLight.html">DirectionalLight</a>'s
- effect on the scene. This consists of plane and a line representing the
- light's position and direction.</p></div>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const light = new THREE.DirectionalLight( 0xFFFFFF );
- scene.add( light );
- const helper = new THREE.DirectionalLightHelper( light, 5 );
- scene.add( helper );
- </code></pre></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="DirectionalLightHelper" translate="no">new <a href="#DirectionalLightHelper">DirectionalLightHelper</a><span class="signature">( light : <span class="param-type"><a href="DirectionalLight.html">DirectionalLight</a></span>, size : <span class="param-type">number</span>, color : <span class="param-type">number | <a href="Color.html">Color</a> | string</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new directional light helper.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>light</strong>
- </td>
- <td class="description last">
- <p>The light to be visualized.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>size</strong>
- </td>
- <td class="description last">
- <p>The dimensions of the plane.</p>
- <p>Default is <code>1</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>color</strong>
- </td>
- <td class="description last">
- <p>The helper's color. If not set, the helper will take
- the color of the light.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : number | <a href="Color.html">Color</a> | string</span> </h3>
- <div class="description">
- <p>The color parameter passed in the constructor.
- If not set, the helper will take the color of the light.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="light" translate="no">.<a href="#light">light</a><span class="type-signature"> : <a href="DirectionalLight.html">DirectionalLight</a></span> </h3>
- <div class="description">
- <p>The light being visualized.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="lightPlane" translate="no">.<a href="#lightPlane">lightPlane</a><span class="type-signature"> : <a href="Line.html">Line</a></span> </h3>
- <div class="description">
- <p>Contains the line showing the location of the directional light.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="targetLine" translate="no">.<a href="#targetLine">targetLine</a><span class="type-signature"> : <a href="Line.html">Line</a></span> </h3>
- <div class="description">
- <p>Represents the target line of the directional light.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
- <div class="method">
- <div class="description">
- <p>Frees the GPU-related resources allocated by this instance. Call this
- method whenever this instance is no longer used in your app.</p>
- </div>
- </div>
- <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">()</span> </h3>
- <div class="method">
- <div class="description">
- <p>Updates the helper to match the position and direction of the
- light being visualized.</p>
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/helpers/DirectionalLightHelper.js" translate="no" target="_blank" rel="noopener">src/helpers/DirectionalLightHelper.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|