PixelationNode.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>PixelationNode - 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="TempNode.html">TempNode</a> → </p>
  13. <h1 translate="no">PixelationNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A inner node definition that implements the actual pixelation TSL code.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="PixelationNode" translate="no">new <a href="#PixelationNode">PixelationNode</a><span class="signature">( textureNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, depthNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, normalNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, pixelSize : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, normalEdgeStrength : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, depthEdgeStrength : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new pixelation node.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name">
  30. <strong>textureNode</strong>
  31. </td>
  32. <td class="description last">
  33. <p>The texture node that represents the beauty pass.</p>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td class="name">
  38. <strong>depthNode</strong>
  39. </td>
  40. <td class="description last">
  41. <p>The texture that represents the beauty's depth.</p>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td class="name">
  46. <strong>normalNode</strong>
  47. </td>
  48. <td class="description last">
  49. <p>The texture that represents the beauty's normals.</p>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td class="name">
  54. <strong>pixelSize</strong>
  55. </td>
  56. <td class="description last">
  57. <p>The pixel size.</p>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td class="name">
  62. <strong>normalEdgeStrength</strong>
  63. </td>
  64. <td class="description last">
  65. <p>The normal edge strength.</p>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td class="name">
  70. <strong>depthEdgeStrength</strong>
  71. </td>
  72. <td class="description last">
  73. <p>The depth edge strength.</p>
  74. </td>
  75. </tr>
  76. </tbody>
  77. </table>
  78. </div>
  79. </div>
  80. <h2 class="subsection-title">Properties</h2>
  81. <div class="member">
  82. <h3 class="name" id="depthEdgeStrength" translate="no">.<a href="#depthEdgeStrength">depthEdgeStrength</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  83. <div class="description">
  84. <p>The depth edge strength.</p>
  85. </div>
  86. </div>
  87. <div class="member">
  88. <h3 class="name" id="depthNode" translate="no">.<a href="#depthNode">depthNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  89. <div class="description">
  90. <p>The texture that represents the beauty's depth.</p>
  91. </div>
  92. </div>
  93. <div class="member">
  94. <h3 class="name" id="normalEdgeStrength" translate="no">.<a href="#normalEdgeStrength">normalEdgeStrength</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  95. <div class="description">
  96. <p>The pixel size.</p>
  97. </div>
  98. </div>
  99. <div class="member">
  100. <h3 class="name" id="normalNode" translate="no">.<a href="#normalNode">normalNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  101. <div class="description">
  102. <p>The texture that represents the beauty's normals.</p>
  103. </div>
  104. </div>
  105. <div class="member">
  106. <h3 class="name" id="pixelSize" translate="no">.<a href="#pixelSize">pixelSize</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  107. <div class="description">
  108. <p>The pixel size.</p>
  109. </div>
  110. </div>
  111. <div class="member">
  112. <h3 class="name" id="textureNode" translate="no">.<a href="#textureNode">textureNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  113. <div class="description">
  114. <p>The texture node that represents the beauty pass.</p>
  115. </div>
  116. </div>
  117. <div class="member">
  118. <h3 class="name" id="updateBeforeType" translate="no">.<a href="#updateBeforeType">updateBeforeType</a><span class="type-signature"> : string</span> </h3>
  119. <div class="description">
  120. <p>The <code>updateBeforeType</code> is set to <code>NodeUpdateType.FRAME</code> since the node updates
  121. its internal uniforms once per frame in <code>updateBefore()</code>.</p>
  122. <p>Default is <code>'frame'</code>.</p>
  123. </div>
  124. <dl class="details">
  125. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBeforeType">TempNode#updateBeforeType</a></dt>
  126. </dl>
  127. </div>
  128. <h2 class="subsection-title">Methods</h2>
  129. <h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : ShaderCallNodeInternal</span> </h3>
  130. <div class="method">
  131. <div class="description">
  132. <p>This method is used to setup the effect's TSL code.</p>
  133. </div>
  134. <table class="params">
  135. <tbody>
  136. <tr>
  137. <td class="name">
  138. <strong>builder</strong>
  139. </td>
  140. <td class="description last">
  141. <p>The current node builder.</p>
  142. </td>
  143. </tr>
  144. </tbody>
  145. </table>
  146. <dl class="details">
  147. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#setup">TempNode#setup</a></dt>
  148. </dl>
  149. </div>
  150. <h3 class="name name-method" id="updateBefore" translate="no">.<a href="#updateBefore">updateBefore</a><span class="signature">( frame : <span class="param-type"><a href="NodeFrame.html">NodeFrame</a></span> )</span> </h3>
  151. <div class="method">
  152. <div class="description">
  153. <p>This method is used to update uniforms once per frame.</p>
  154. </div>
  155. <table class="params">
  156. <tbody>
  157. <tr>
  158. <td class="name">
  159. <strong>frame</strong>
  160. </td>
  161. <td class="description last">
  162. <p>The current node frame.</p>
  163. </td>
  164. </tr>
  165. </tbody>
  166. </table>
  167. <dl class="details">
  168. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBefore">TempNode#updateBefore</a></dt>
  169. </dl>
  170. </div>
  171. <h2 class="subsection-title">Source</h2>
  172. <p>
  173. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/PixelationPassNode.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/display/PixelationPassNode.js</a>
  174. </p>
  175. </article>
  176. </section>
  177. <script src="../scripts/linenumber.js"></script>
  178. <script src="../scripts/page.js"></script>
  179. </body>
  180. </html>
粤ICP备19079148号