| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>SpotLightHelper - 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">SpotLightHelper</h1>
- <section>
- <header>
- <div class="class-description"><p>This displays a cone shaped helper object for a <a href="SpotLight.html">SpotLight</a>.</p></div>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const spotLight = new THREE.SpotLight( 0xffffff );
- spotLight.position.set( 10, 10, 10 );
- scene.add( spotLight );
- const spotLightHelper = new THREE.SpotLightHelper( spotLight );
- scene.add( spotLightHelper );
- </code></pre></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="SpotLightHelper" translate="no">new <a href="#SpotLightHelper">SpotLightHelper</a><span class="signature">( light : <span class="param-type">HemisphereLight</span>, color : <span class="param-type">number | Color | string</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new spot light helper.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>light</code></td>
- <td class="description last"><p>The light to be visualized.</p></td>
- </tr>
- <tr>
- <td class="name"><code>color</code></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="SpotLight.html">SpotLight</a></span> </h3>
- <div class="description">
- <p>The light being visualized.</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/SpotLightHelper.js" target="_blank" rel="noopener" translate="no">src/helpers/SpotLightHelper.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|