| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>SpotLightNode - 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="Node.html">Node</a> → <a href="LightingNode.html">LightingNode</a> → <a href="AnalyticLightNode.html">AnalyticLightNode</a> → </p>
- <h1 translate="no">SpotLightNode</h1>
- <section>
- <header>
- <div class="class-description"><p>Module for representing spot lights as nodes.</p></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="SpotLightNode" translate="no">new <a href="#SpotLightNode">SpotLightNode</a><span class="signature">( light : <span class="param-type"><a href="SpotLight.html">SpotLight</a></span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new spot light node.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>light</strong>
- </td>
- <td class="description last">
- <p>The spot light source.</p>
- <p>Default is <code>null</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="colorNode" translate="no">.<a href="#colorNode">colorNode</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.<<a href="Color.html">Color</a>></span> </h3>
- <div class="description">
- <p>Uniform node representing the light color.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="AnalyticLightNode.html#colorNode">AnalyticLightNode#colorNode</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="coneCosNode" translate="no">.<a href="#coneCosNode">coneCosNode</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.<float></span> </h3>
- <div class="description">
- <p>Uniform node representing the cone cosine.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="cutoffDistanceNode" translate="no">.<a href="#cutoffDistanceNode">cutoffDistanceNode</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.<float></span> </h3>
- <div class="description">
- <p>Uniform node representing the cutoff distance.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="decayExponentNode" translate="no">.<a href="#decayExponentNode">decayExponentNode</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.<float></span> </h3>
- <div class="description">
- <p>Uniform node representing the decay exponent.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="penumbraCosNode" translate="no">.<a href="#penumbraCosNode">penumbraCosNode</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.<float></span> </h3>
- <div class="description">
- <p>Uniform node representing the penumbra cosine.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="getSpotAttenuation" translate="no">.<a href="#getSpotAttenuation">getSpotAttenuation</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span>, angleCosine : <span class="param-type"><a href="Node.html">Node</a>.<float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.<float></span> </h3>
- <div class="method">
- <div class="description">
- <p>Computes the spot attenuation for the given angle.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>builder</strong>
- </td>
- <td class="description last">
- <p>The node builder.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>angleCosine</strong>
- </td>
- <td class="description last">
- <p>The angle to compute the spot attenuation for.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The spot attenuation.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">( frame : <span class="param-type"><a href="NodeFrame.html">NodeFrame</a></span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Overwritten to updated spot light specific uniforms.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>frame</strong>
- </td>
- <td class="description last">
- <p>A reference to the current node frame.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="AnalyticLightNode.html#update">AnalyticLightNode#update</a></dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/lighting/SpotLightNode.js" translate="no" target="_blank" rel="noopener">src/nodes/lighting/SpotLightNode.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|