ClippingNode.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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"><code>scope</code></td>
  32. <td class="description last"><p>The node's scope. Similar to other nodes,
  33. the selected scope influences the behavior of the node and what type of code is generated.<br/>Default is <code>'default'</code>.</p></td>
  34. </tr>
  35. </tbody>
  36. </table>
  37. </div>
  38. </div>
  39. <h2 class="subsection-title">Properties</h2>
  40. <div class="member">
  41. <h3 class="name" id="scope" translate="no">.<a href="#scope">scope</a><span class="type-signature"> : 'default' | 'hardware' | 'alphaToCoverage'</span> </h3>
  42. <div class="description">
  43. <p>The node's scope. Similar to other nodes, the selected scope influences
  44. the behavior of the node and what type of code is generated.</p>
  45. </div>
  46. </div>
  47. <h2 class="subsection-title">Methods</h2>
  48. <h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  49. <div class="method">
  50. <div class="description">
  51. <p>Setups the node depending on the selected scope.</p>
  52. </div>
  53. <table class="params">
  54. <tbody>
  55. <tr>
  56. <td class="name"><code>builder</code></td>
  57. <td class="description last"><p>The current node builder.</p></td>
  58. </tr>
  59. </tbody>
  60. </table>
  61. <dl class="details">
  62. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#setup">Node#setup</a></dt>
  63. </dl>
  64. <dl class="details">
  65. <dt class="tag-returns"><strong>Returns:</strong> The result node.</dt>
  66. </dl>
  67. </div>
  68. <h3 class="name name-method" id="setupAlphaToCoverage" translate="no">.<a href="#setupAlphaToCoverage">setupAlphaToCoverage</a><span class="signature">( intersectionPlanes : <span class="param-type">Array.&lt;Vector4></span>, unionPlanes : <span class="param-type">Array.&lt;Vector4></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  69. <div class="method">
  70. <div class="description">
  71. <p>Setups alpha to coverage.</p>
  72. </div>
  73. <table class="params">
  74. <tbody>
  75. <tr>
  76. <td class="name"><code>intersectionPlanes</code></td>
  77. <td class="description last"><p>The intersection planes.</p></td>
  78. </tr>
  79. <tr>
  80. <td class="name"><code>unionPlanes</code></td>
  81. <td class="description last"><p>The union planes.</p></td>
  82. </tr>
  83. </tbody>
  84. </table>
  85. <dl class="details">
  86. <dt class="tag-returns"><strong>Returns:</strong> The result node.</dt>
  87. </dl>
  88. </div>
  89. <h3 class="name name-method" id="setupDefault" translate="no">.<a href="#setupDefault">setupDefault</a><span class="signature">( intersectionPlanes : <span class="param-type">Array.&lt;Vector4></span>, unionPlanes : <span class="param-type">Array.&lt;Vector4></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  90. <div class="method">
  91. <div class="description">
  92. <p>Setups the default clipping.</p>
  93. </div>
  94. <table class="params">
  95. <tbody>
  96. <tr>
  97. <td class="name"><code>intersectionPlanes</code></td>
  98. <td class="description last"><p>The intersection planes.</p></td>
  99. </tr>
  100. <tr>
  101. <td class="name"><code>unionPlanes</code></td>
  102. <td class="description last"><p>The union planes.</p></td>
  103. </tr>
  104. </tbody>
  105. </table>
  106. <dl class="details">
  107. <dt class="tag-returns"><strong>Returns:</strong> The result node.</dt>
  108. </dl>
  109. </div>
  110. <h3 class="name name-method" id="setupHardwareClipping" translate="no">.<a href="#setupHardwareClipping">setupHardwareClipping</a><span class="signature">( unionPlanes : <span class="param-type">Array.&lt;Vector4></span>, builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  111. <div class="method">
  112. <div class="description">
  113. <p>Setups hardware clipping.</p>
  114. </div>
  115. <table class="params">
  116. <tbody>
  117. <tr>
  118. <td class="name"><code>unionPlanes</code></td>
  119. <td class="description last"><p>The union planes.</p></td>
  120. </tr>
  121. <tr>
  122. <td class="name"><code>builder</code></td>
  123. <td class="description last"><p>The current node builder.</p></td>
  124. </tr>
  125. </tbody>
  126. </table>
  127. <dl class="details">
  128. <dt class="tag-returns"><strong>Returns:</strong> The result node.</dt>
  129. </dl>
  130. </div>
  131. <h2 class="subsection-title">Source</h2>
  132. <p>
  133. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/accessors/ClippingNode.js" target="_blank" rel="noopener" translate="no">src/nodes/accessors/ClippingNode.js</a>
  134. </p>
  135. </article>
  136. </section>
  137. <script src="../scripts/linenumber.js"></script>
  138. <script src="../scripts/page.js"></script>
  139. </body>
  140. </html>
粤ICP备19079148号