PointShadowNode.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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"><a href="PointLight.html">PointLight</a></span>, shadow : <span class="param-type"><a href="PointLightShadow.html">PointLightShadow</a></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">
  30. <strong>light</strong>
  31. </td>
  32. <td class="description last">
  33. <p>The shadow casting point light.</p>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td class="name">
  38. <strong>shadow</strong>
  39. </td>
  40. <td class="description last">
  41. <p>An optional point light shadow.</p>
  42. <p>Default is <code>null</code>.</p>
  43. </td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. </div>
  48. </div>
  49. <h2 class="subsection-title">Methods</h2>
  50. <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>
  51. <div class="method">
  52. <div class="description">
  53. <p>Overwrites the default implementation to return point light shadow specific
  54. filtering functions.</p>
  55. </div>
  56. <table class="params">
  57. <tbody>
  58. <tr>
  59. <td class="name">
  60. <strong>type</strong>
  61. </td>
  62. <td class="description last">
  63. <p>The shadow type.</p>
  64. </td>
  65. </tr>
  66. </tbody>
  67. </table>
  68. <dl class="details">
  69. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="ShadowNode.html#getShadowFilterFn">ShadowNode#getShadowFilterFn</a></dt>
  70. </dl>
  71. <dl class="details">
  72. <dt class="tag-returns"><strong>Returns:</strong> The filtering function.</dt>
  73. </dl>
  74. </div>
  75. <h3 class="name name-method" id="renderShadow" translate="no">.<a href="#renderShadow">renderShadow</a><span class="signature">( frame : <span class="param-type"><a href="NodeFrame.html">NodeFrame</a></span> )</span> </h3>
  76. <div class="method">
  77. <div class="description">
  78. <p>Overwrites the default implementation with point light specific
  79. rendering code.</p>
  80. </div>
  81. <table class="params">
  82. <tbody>
  83. <tr>
  84. <td class="name">
  85. <strong>frame</strong>
  86. </td>
  87. <td class="description last">
  88. <p>A reference to the current node frame.</p>
  89. </td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. <dl class="details">
  94. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="ShadowNode.html#renderShadow">ShadowNode#renderShadow</a></dt>
  95. </dl>
  96. </div>
  97. <h3 class="name name-method" id="setupShadowCoord" translate="no">.<a href="#setupShadowCoord">setupShadowCoord</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span>, shadowPosition : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  98. <div class="method">
  99. <div class="description">
  100. <p>Overwrites the default implementation so the unaltered shadow position is used.</p>
  101. </div>
  102. <table class="params">
  103. <tbody>
  104. <tr>
  105. <td class="name">
  106. <strong>builder</strong>
  107. </td>
  108. <td class="description last">
  109. <p>A reference to the current node builder.</p>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td class="name">
  114. <strong>shadowPosition</strong>
  115. </td>
  116. <td class="description last">
  117. <p>A node representing the shadow position.</p>
  118. </td>
  119. </tr>
  120. </tbody>
  121. </table>
  122. <dl class="details">
  123. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="ShadowNode.html#setupShadowCoord">ShadowNode#setupShadowCoord</a></dt>
  124. </dl>
  125. <dl class="details">
  126. <dt class="tag-returns"><strong>Returns:</strong> The shadow coordinates.</dt>
  127. </dl>
  128. </div>
  129. <h3 class="name name-method" id="setupShadowFilter" translate="no">.<a href="#setupShadowFilter">setupShadowFilter</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span>, inputs : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  130. <div class="method">
  131. <div class="description">
  132. <p>Overwrites the default implementation to only use point light specific
  133. shadow filter functions.</p>
  134. </div>
  135. <table class="params">
  136. <tbody>
  137. <tr>
  138. <td class="name">
  139. <strong>builder</strong>
  140. </td>
  141. <td class="description last">
  142. <p>A reference to the current node builder.</p>
  143. </td>
  144. </tr>
  145. <tr>
  146. <td class="name">
  147. <strong>inputs</strong>
  148. </td>
  149. <td class="description last">
  150. <p>A configuration object that defines the shadow filtering.</p>
  151. <table class="params">
  152. <tbody>
  153. <tr>
  154. <td class="name">
  155. <strong>filterFn</strong>
  156. </td>
  157. <td class="description last">
  158. <p>This function defines the filtering type of the shadow map e.g. PCF.</p>
  159. </td>
  160. </tr>
  161. <tr>
  162. <td class="name">
  163. <strong>shadowTexture</strong>
  164. </td>
  165. <td class="description last">
  166. <p>A reference to the shadow map's texture.</p>
  167. </td>
  168. </tr>
  169. <tr>
  170. <td class="name">
  171. <strong>depthTexture</strong>
  172. </td>
  173. <td class="description last">
  174. <p>A reference to the shadow map's texture data.</p>
  175. </td>
  176. </tr>
  177. <tr>
  178. <td class="name">
  179. <strong>shadowCoord</strong>
  180. </td>
  181. <td class="description last">
  182. <p>Shadow coordinates which are used to sample from the shadow map.</p>
  183. </td>
  184. </tr>
  185. <tr>
  186. <td class="name">
  187. <strong>shadow</strong>
  188. </td>
  189. <td class="description last">
  190. <p>The light shadow.</p>
  191. </td>
  192. </tr>
  193. </tbody>
  194. </table>
  195. </td>
  196. </tr>
  197. </tbody>
  198. </table>
  199. <dl class="details">
  200. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="ShadowNode.html#setupShadowFilter">ShadowNode#setupShadowFilter</a></dt>
  201. </dl>
  202. <dl class="details">
  203. <dt class="tag-returns"><strong>Returns:</strong> The result node of the shadow filtering.</dt>
  204. </dl>
  205. </div>
  206. <h2 class="subsection-title">Source</h2>
  207. <p>
  208. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/lighting/PointShadowNode.js" translate="no" target="_blank" rel="noopener">src/nodes/lighting/PointShadowNode.js</a>
  209. </p>
  210. </article>
  211. </section>
  212. <script src="../scripts/linenumber.js"></script>
  213. <script src="../scripts/page.js"></script>
  214. </body>
  215. </html>
粤ICP备19079148号