PointShadowNode.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>PointShadowNode - 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="Node.html">Node</a> → <a href="ShadowBaseNode.html">ShadowBaseNode</a> → <a href="ShadowNode.html">ShadowNode</a> → </p>
  13. <h1 translate="no">PointShadowNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Represents the shadow implementation for point light nodes.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="PointShadowNode" translate="no">new <a href="#PointShadowNode">PointShadowNode</a><span class="signature">( light : <span class="param-type">PointLight</span>, shadow : <span class="param-type">PointLightShadow</span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new point shadow node.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name"><code>light</code></td>
  30. <td class="description last"><p>The shadow casting point light.</p></td>
  31. </tr>
  32. <tr>
  33. <td class="name"><code>shadow</code></td>
  34. <td class="description last"><p>An optional point light shadow.<br/>Default is <code>null</code>.</p></td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. </div>
  40. <h2 class="subsection-title">Methods</h2>
  41. <h3 class="name name-method" id="getShadowFilterFn" translate="no">.<a href="#getShadowFilterFn">getShadowFilterFn</a><span class="signature">( type : <span class="param-type">number</span> )</span><span class="type-signature"> : function</span> </h3>
  42. <div class="method">
  43. <div class="description">
  44. <p>Overwrites the default implementation to return point light shadow specific
  45. filtering functions.</p>
  46. </div>
  47. <table class="params">
  48. <tbody>
  49. <tr>
  50. <td class="name"><code>type</code></td>
  51. <td class="description last"><p>The shadow type.</p></td>
  52. </tr>
  53. </tbody>
  54. </table>
  55. <dl class="details">
  56. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="ShadowNode.html#getShadowFilterFn">ShadowNode#getShadowFilterFn</a></dt>
  57. </dl>
  58. <dl class="details">
  59. <dt class="tag-returns"><strong>Returns:</strong> The filtering function.</dt>
  60. </dl>
  61. </div>
  62. <h3 class="name name-method" id="renderShadow" translate="no">.<a href="#renderShadow">renderShadow</a><span class="signature">( frame : <span class="param-type">NodeFrame</span> )</span> </h3>
  63. <div class="method">
  64. <div class="description">
  65. <p>Overwrites the default implementation with point light specific
  66. rendering code.</p>
  67. </div>
  68. <table class="params">
  69. <tbody>
  70. <tr>
  71. <td class="name"><code>frame</code></td>
  72. <td class="description last"><p>A reference to the current node frame.</p></td>
  73. </tr>
  74. </tbody>
  75. </table>
  76. <dl class="details">
  77. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="ShadowNode.html#renderShadow">ShadowNode#renderShadow</a></dt>
  78. </dl>
  79. </div>
  80. <h3 class="name name-method" id="setupShadowCoord" translate="no">.<a href="#setupShadowCoord">setupShadowCoord</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span>, shadowPosition : <span class="param-type">Node.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  81. <div class="method">
  82. <div class="description">
  83. <p>Overwrites the default implementation so the unaltered shadow position is used.</p>
  84. </div>
  85. <table class="params">
  86. <tbody>
  87. <tr>
  88. <td class="name"><code>builder</code></td>
  89. <td class="description last"><p>A reference to the current node builder.</p></td>
  90. </tr>
  91. <tr>
  92. <td class="name"><code>shadowPosition</code></td>
  93. <td class="description last"><p>A node representing the shadow position.</p></td>
  94. </tr>
  95. </tbody>
  96. </table>
  97. <dl class="details">
  98. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="ShadowNode.html#setupShadowCoord">ShadowNode#setupShadowCoord</a></dt>
  99. </dl>
  100. <dl class="details">
  101. <dt class="tag-returns"><strong>Returns:</strong> The shadow coordinates.</dt>
  102. </dl>
  103. </div>
  104. <h3 class="name name-method" id="setupShadowFilter" translate="no">.<a href="#setupShadowFilter">setupShadowFilter</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span>, inputs : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  105. <div class="method">
  106. <div class="description">
  107. <p>Overwrites the default implementation to only use point light specific
  108. shadow filter functions.</p>
  109. </div>
  110. <table class="params">
  111. <tbody>
  112. <tr>
  113. <td class="name"><code>builder</code></td>
  114. <td class="description last"><p>A reference to the current node builder.</p></td>
  115. </tr>
  116. <tr>
  117. <td class="name"><code>inputs</code></td>
  118. <td class="description last"><p>A configuration object that defines the shadow filtering.</p>
  119. <h6>Properties</h6>
  120. <table class="params">
  121. <tbody>
  122. <tr>
  123. <td class="name"><code>filterFn</code></td>
  124. <td class="description last"><p>This function defines the filtering type of the shadow map e.g. PCF.</p></td>
  125. </tr>
  126. <tr>
  127. <td class="name"><code>shadowTexture</code></td>
  128. <td class="description last"><p>A reference to the shadow map's texture.</p></td>
  129. </tr>
  130. <tr>
  131. <td class="name"><code>depthTexture</code></td>
  132. <td class="description last"><p>A reference to the shadow map's texture data.</p></td>
  133. </tr>
  134. <tr>
  135. <td class="name"><code>shadowCoord</code></td>
  136. <td class="description last"><p>Shadow coordinates which are used to sample from the shadow map.</p></td>
  137. </tr>
  138. <tr>
  139. <td class="name"><code>shadow</code></td>
  140. <td class="description last"><p>The light shadow.</p></td>
  141. </tr>
  142. </tbody>
  143. </table>
  144. </td>
  145. </tr>
  146. </tbody>
  147. </table>
  148. <dl class="details">
  149. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="ShadowNode.html#setupShadowFilter">ShadowNode#setupShadowFilter</a></dt>
  150. </dl>
  151. <dl class="details">
  152. <dt class="tag-returns"><strong>Returns:</strong> The result node of the shadow filtering.</dt>
  153. </dl>
  154. </div>
  155. <h2 class="subsection-title">Source</h2>
  156. <p>
  157. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/lighting/PointShadowNode.js" target="_blank" rel="noopener" translate="no">src/nodes/lighting/PointShadowNode.js</a>
  158. </p>
  159. </article>
  160. </section>
  161. <script src="../scripts/linenumber.js"></script>
  162. <script src="../scripts/page.js"></script>
  163. </body>
  164. </html>
粤ICP备19079148号