ClippingNode.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ClippingNode - 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> → </p>
  13. <h1 translate="no">ClippingNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This node is used in <a href="NodeMaterial.html">NodeMaterial</a> to setup the clipping
  17. which can happen hardware-accelerated (if supported) and optionally
  18. use alpha-to-coverage for anti-aliasing clipped edges.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="ClippingNode" translate="no">new <a href="#ClippingNode">ClippingNode</a><span class="signature">( scope : <span class="param-type">'default' | 'hardware' | 'alphaToCoverage'</span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new clipping node.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name">
  32. <strong>scope</strong>
  33. </td>
  34. <td class="description last">
  35. <p>The node's scope. Similar to other nodes,
  36. the selected scope influences the behavior of the node and what type of code is generated.</p>
  37. <p>Default is <code>'default'</code>.</p>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. </div>
  44. <h2 class="subsection-title">Properties</h2>
  45. <div class="member">
  46. <h3 class="name" id="scope" translate="no">.<a href="#scope">scope</a><span class="type-signature"> : 'default' | 'hardware' | 'alphaToCoverage'</span> </h3>
  47. <div class="description">
  48. <p>The node's scope. Similar to other nodes, the selected scope influences
  49. the behavior of the node and what type of code is generated.</p>
  50. </div>
  51. </div>
  52. <h2 class="subsection-title">Methods</h2>
  53. <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"> : <a href="Node.html">Node</a></span> </h3>
  54. <div class="method">
  55. <div class="description">
  56. <p>Setups the node depending on the selected scope.</p>
  57. </div>
  58. <table class="params">
  59. <tbody>
  60. <tr>
  61. <td class="name">
  62. <strong>builder</strong>
  63. </td>
  64. <td class="description last">
  65. <p>The current node builder.</p>
  66. </td>
  67. </tr>
  68. </tbody>
  69. </table>
  70. <dl class="details">
  71. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#setup">Node#setup</a></dt>
  72. </dl>
  73. <dl class="details">
  74. <dt class="tag-returns"><strong>Returns:</strong> The result node.</dt>
  75. </dl>
  76. </div>
  77. <h3 class="name name-method" id="setupAlphaToCoverage" translate="no">.<a href="#setupAlphaToCoverage">setupAlphaToCoverage</a><span class="signature">( intersectionPlanes : <span class="param-type">Array.&lt;<a href="Vector4.html">Vector4</a>></span>, unionPlanes : <span class="param-type">Array.&lt;<a href="Vector4.html">Vector4</a>></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  78. <div class="method">
  79. <div class="description">
  80. <p>Setups alpha to coverage.</p>
  81. </div>
  82. <table class="params">
  83. <tbody>
  84. <tr>
  85. <td class="name">
  86. <strong>intersectionPlanes</strong>
  87. </td>
  88. <td class="description last">
  89. <p>The intersection planes.</p>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td class="name">
  94. <strong>unionPlanes</strong>
  95. </td>
  96. <td class="description last">
  97. <p>The union planes.</p>
  98. </td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. <dl class="details">
  103. <dt class="tag-returns"><strong>Returns:</strong> The result node.</dt>
  104. </dl>
  105. </div>
  106. <h3 class="name name-method" id="setupDefault" translate="no">.<a href="#setupDefault">setupDefault</a><span class="signature">( intersectionPlanes : <span class="param-type">Array.&lt;<a href="Vector4.html">Vector4</a>></span>, unionPlanes : <span class="param-type">Array.&lt;<a href="Vector4.html">Vector4</a>></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  107. <div class="method">
  108. <div class="description">
  109. <p>Setups the default clipping.</p>
  110. </div>
  111. <table class="params">
  112. <tbody>
  113. <tr>
  114. <td class="name">
  115. <strong>intersectionPlanes</strong>
  116. </td>
  117. <td class="description last">
  118. <p>The intersection planes.</p>
  119. </td>
  120. </tr>
  121. <tr>
  122. <td class="name">
  123. <strong>unionPlanes</strong>
  124. </td>
  125. <td class="description last">
  126. <p>The union planes.</p>
  127. </td>
  128. </tr>
  129. </tbody>
  130. </table>
  131. <dl class="details">
  132. <dt class="tag-returns"><strong>Returns:</strong> The result node.</dt>
  133. </dl>
  134. </div>
  135. <h3 class="name name-method" id="setupHardwareClipping" translate="no">.<a href="#setupHardwareClipping">setupHardwareClipping</a><span class="signature">( unionPlanes : <span class="param-type">Array.&lt;<a href="Vector4.html">Vector4</a>></span>, builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  136. <div class="method">
  137. <div class="description">
  138. <p>Setups hardware clipping.</p>
  139. </div>
  140. <table class="params">
  141. <tbody>
  142. <tr>
  143. <td class="name">
  144. <strong>unionPlanes</strong>
  145. </td>
  146. <td class="description last">
  147. <p>The union planes.</p>
  148. </td>
  149. </tr>
  150. <tr>
  151. <td class="name">
  152. <strong>builder</strong>
  153. </td>
  154. <td class="description last">
  155. <p>The current node builder.</p>
  156. </td>
  157. </tr>
  158. </tbody>
  159. </table>
  160. <dl class="details">
  161. <dt class="tag-returns"><strong>Returns:</strong> The result node.</dt>
  162. </dl>
  163. </div>
  164. <h2 class="subsection-title">Source</h2>
  165. <p>
  166. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/accessors/ClippingNode.js" translate="no" target="_blank" rel="noopener">src/nodes/accessors/ClippingNode.js</a>
  167. </p>
  168. </article>
  169. </section>
  170. <script src="../scripts/linenumber.js"></script>
  171. <script src="../scripts/page.js"></script>
  172. </body>
  173. </html>
粤ICP备19079148号