TransitionNode.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>TransitionNode - 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">TransitionNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Post processing node for creating a transition effect between scenes.</p></div>
  17. </header>
  18. <article>
  19. <h2 class="subsection-title">Import</h2>
  20. <p><span translate="no">TransitionNode</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
  21. <pre><code class="language-js">import { transition } from 'three/addons/tsl/display/TransitionNode.js';</code></pre>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="TransitionNode" translate="no">new <a href="#TransitionNode">TransitionNode</a><span class="signature">( textureNodeA : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, textureNodeB : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, mixTextureNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, mixRatioNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, thresholdNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, useTextureNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span> </h3>
  25. <div class="method">
  26. <div class="description">
  27. <p>Constructs a new transition node.</p>
  28. </div>
  29. <table class="params">
  30. <tbody>
  31. <tr>
  32. <td class="name">
  33. <strong>textureNodeA</strong>
  34. </td>
  35. <td class="description last">
  36. <p>A texture node that represents the beauty pass of the first scene.</p>
  37. </td>
  38. </tr>
  39. <tr>
  40. <td class="name">
  41. <strong>textureNodeB</strong>
  42. </td>
  43. <td class="description last">
  44. <p>A texture node that represents the beauty pass of the second scene.</p>
  45. </td>
  46. </tr>
  47. <tr>
  48. <td class="name">
  49. <strong>mixTextureNode</strong>
  50. </td>
  51. <td class="description last">
  52. <p>A texture node that defines how the transition effect should look like.</p>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td class="name">
  57. <strong>mixRatioNode</strong>
  58. </td>
  59. <td class="description last">
  60. <p>The interpolation factor that controls the mix.</p>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td class="name">
  65. <strong>thresholdNode</strong>
  66. </td>
  67. <td class="description last">
  68. <p>Can be used to tweak the linear interpolation.</p>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td class="name">
  73. <strong>useTextureNode</strong>
  74. </td>
  75. <td class="description last">
  76. <p>Whether <code>mixTextureNode</code> should influence the transition or not.</p>
  77. </td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. </div>
  82. </div>
  83. <h2 class="subsection-title">Properties</h2>
  84. <div class="member">
  85. <h3 class="name" id="mixRatioNode" translate="no">.<a href="#mixRatioNode">mixRatioNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  86. <div class="description">
  87. <p>The interpolation factor that controls the mix.</p>
  88. </div>
  89. </div>
  90. <div class="member">
  91. <h3 class="name" id="mixTextureNode" translate="no">.<a href="#mixTextureNode">mixTextureNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  92. <div class="description">
  93. <p>A texture that defines how the transition effect should look like.</p>
  94. </div>
  95. </div>
  96. <div class="member">
  97. <h3 class="name" id="textureNodeA" translate="no">.<a href="#textureNodeA">textureNodeA</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  98. <div class="description">
  99. <p>A texture node that represents the beauty pass of the first scene.</p>
  100. </div>
  101. </div>
  102. <div class="member">
  103. <h3 class="name" id="textureNodeB" translate="no">.<a href="#textureNodeB">textureNodeB</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  104. <div class="description">
  105. <p>A texture node that represents the beauty pass of the second scene.</p>
  106. </div>
  107. </div>
  108. <div class="member">
  109. <h3 class="name" id="thresholdNode" translate="no">.<a href="#thresholdNode">thresholdNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  110. <div class="description">
  111. <p>Can be used to tweak the linear interpolation.</p>
  112. </div>
  113. </div>
  114. <div class="member">
  115. <h3 class="name" id="useTextureNode" translate="no">.<a href="#useTextureNode">useTextureNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  116. <div class="description">
  117. <p>Whether <code>mixTextureNode</code> should influence the transition or not.</p>
  118. </div>
  119. </div>
  120. <h2 class="subsection-title">Methods</h2>
  121. <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>
  122. <div class="method">
  123. <div class="description">
  124. <p>This method is used to setup the effect's TSL code.</p>
  125. </div>
  126. <table class="params">
  127. <tbody>
  128. <tr>
  129. <td class="name">
  130. <strong>builder</strong>
  131. </td>
  132. <td class="description last">
  133. <p>The current node builder.</p>
  134. </td>
  135. </tr>
  136. </tbody>
  137. </table>
  138. <dl class="details">
  139. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#setup">TempNode#setup</a></dt>
  140. </dl>
  141. </div>
  142. <h2 class="subsection-title">Source</h2>
  143. <p>
  144. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/TransitionNode.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/display/TransitionNode.js</a>
  145. </p>
  146. </article>
  147. </section>
  148. <script src="../scripts/linenumber.js"></script>
  149. <script src="../scripts/page.js"></script>
  150. </body>
  151. </html>
粤ICP备19079148号