ClearMaskPass.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ClearMaskPass - 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="Pass.html">Pass</a> → </p>
  13. <h1 translate="no">ClearMaskPass</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This pass can be used to clear a mask previously defined with <a href="MaskPass.html">MaskPass</a>.</p></div>
  17. <h2>Code Example</h2>
  18. <div translate="no"><pre><code class="language-js">const clearPass = new ClearMaskPass();
  19. composer.addPass( clearPass );
  20. </code></pre></div>
  21. </header>
  22. <article>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="ClearMaskPass" translate="no">new <a href="#ClearMaskPass">ClearMaskPass</a><span class="signature">()</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new clear mask pass.</p>
  29. </div>
  30. </div>
  31. </div>
  32. <h2 class="subsection-title">Properties</h2>
  33. <div class="member">
  34. <h3 class="name" id="needsSwap" translate="no">.<a href="#needsSwap">needsSwap</a><span class="type-signature"> : boolean</span> </h3>
  35. <div class="description">
  36. <p>Overwritten to disable the swap.<br/>Default is <code>false</code>.</p>
  37. </div>
  38. <dl class="details">
  39. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Pass.html#needsSwap">Pass#needsSwap</a></dt>
  40. </dl>
  41. </div>
  42. <h2 class="subsection-title">Methods</h2>
  43. <h3 class="name name-method" id="render" translate="no">.<a href="#render">render</a><span class="signature">( renderer : <span class="param-type">WebGLRenderer</span>, writeBuffer : <span class="param-type">WebGLRenderTarget</span>, readBuffer : <span class="param-type">WebGLRenderTarget</span>, deltaTime : <span class="param-type">number</span>, maskActive : <span class="param-type">boolean</span> )</span> </h3>
  44. <div class="method">
  45. <div class="description">
  46. <p>Performs the clear of the currently defined mask.</p>
  47. </div>
  48. <table class="params">
  49. <tbody>
  50. <tr>
  51. <td class="name"><code>renderer</code></td>
  52. <td class="description last"><p>The renderer.</p></td>
  53. </tr>
  54. <tr>
  55. <td class="name"><code>writeBuffer</code></td>
  56. <td class="description last"><p>The write buffer. This buffer is intended as the rendering
  57. destination for the pass.</p></td>
  58. </tr>
  59. <tr>
  60. <td class="name"><code>readBuffer</code></td>
  61. <td class="description last"><p>The read buffer. The pass can access the result from the
  62. previous pass from this buffer.</p></td>
  63. </tr>
  64. <tr>
  65. <td class="name"><code>deltaTime</code></td>
  66. <td class="description last"><p>The delta time in seconds.</p></td>
  67. </tr>
  68. <tr>
  69. <td class="name"><code>maskActive</code></td>
  70. <td class="description last"><p>Whether masking is active or not.</p></td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. <dl class="details">
  75. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Pass.html#render">Pass#render</a></dt>
  76. </dl>
  77. </div>
  78. <h2 class="subsection-title">Source</h2>
  79. <p>
  80. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/postprocessing/MaskPass.js" target="_blank" rel="noopener" translate="no">examples/jsm/postprocessing/MaskPass.js</a>
  81. </p>
  82. </article>
  83. </section>
  84. <script src="../scripts/linenumber.js"></script>
  85. <script src="../scripts/page.js"></script>
  86. </body>
  87. </html>
粤ICP备19079148号