TransitionNode.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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">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">TextureNode</span>, textureNodeB : <span class="param-type">TextureNode</span>, mixTextureNode : <span class="param-type">TextureNode</span>, mixRatioNode : <span class="param-type">Node.&lt;float></span>, thresholdNode : <span class="param-type">Node.&lt;float></span>, useTextureNode : <span class="param-type">Node.&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"><code>textureNodeA</code></td>
  33. <td class="description last"><p>A texture node that represents the beauty pass of the first scene.</p></td>
  34. </tr>
  35. <tr>
  36. <td class="name"><code>textureNodeB</code></td>
  37. <td class="description last"><p>A texture node that represents the beauty pass of the second scene.</p></td>
  38. </tr>
  39. <tr>
  40. <td class="name"><code>mixTextureNode</code></td>
  41. <td class="description last"><p>A texture node that defines how the transition effect should look like.</p></td>
  42. </tr>
  43. <tr>
  44. <td class="name"><code>mixRatioNode</code></td>
  45. <td class="description last"><p>The interpolation factor that controls the mix.</p></td>
  46. </tr>
  47. <tr>
  48. <td class="name"><code>thresholdNode</code></td>
  49. <td class="description last"><p>Can be used to tweak the linear interpolation.</p></td>
  50. </tr>
  51. <tr>
  52. <td class="name"><code>useTextureNode</code></td>
  53. <td class="description last"><p>Whether <code>mixTextureNode</code> should influence the transition or not.</p></td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. </div>
  58. </div>
  59. <h2 class="subsection-title">Properties</h2>
  60. <div class="member">
  61. <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>
  62. <div class="description">
  63. <p>The interpolation factor that controls the mix.</p>
  64. </div>
  65. </div>
  66. <div class="member">
  67. <h3 class="name" id="mixTextureNode" translate="no">.<a href="#mixTextureNode">mixTextureNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  68. <div class="description">
  69. <p>A texture that defines how the transition effect should look like.</p>
  70. </div>
  71. </div>
  72. <div class="member">
  73. <h3 class="name" id="textureNodeA" translate="no">.<a href="#textureNodeA">textureNodeA</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  74. <div class="description">
  75. <p>A texture node that represents the beauty pass of the first scene.</p>
  76. </div>
  77. </div>
  78. <div class="member">
  79. <h3 class="name" id="textureNodeB" translate="no">.<a href="#textureNodeB">textureNodeB</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  80. <div class="description">
  81. <p>A texture node that represents the beauty pass of the second scene.</p>
  82. </div>
  83. </div>
  84. <div class="member">
  85. <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>
  86. <div class="description">
  87. <p>Can be used to tweak the linear interpolation.</p>
  88. </div>
  89. </div>
  90. <div class="member">
  91. <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>
  92. <div class="description">
  93. <p>Whether <code>mixTextureNode</code> should influence the transition or not.</p>
  94. </div>
  95. </div>
  96. <h2 class="subsection-title">Methods</h2>
  97. <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"> : ShaderCallNodeInternal</span> </h3>
  98. <div class="method">
  99. <div class="description">
  100. <p>This method is used to setup the effect's TSL code.</p>
  101. </div>
  102. <table class="params">
  103. <tbody>
  104. <tr>
  105. <td class="name"><code>builder</code></td>
  106. <td class="description last"><p>The current node builder.</p></td>
  107. </tr>
  108. </tbody>
  109. </table>
  110. <dl class="details">
  111. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#setup">TempNode#setup</a></dt>
  112. </dl>
  113. <dl class="details">
  114. <dt class="tag-returns"><strong>Returns:</strong> </dt>
  115. </dl>
  116. </div>
  117. <h2 class="subsection-title">Source</h2>
  118. <p>
  119. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/TransitionNode.js" target="_blank" rel="noopener" translate="no">examples/jsm/tsl/display/TransitionNode.js</a>
  120. </p>
  121. </article>
  122. </section>
  123. <script src="../scripts/linenumber.js"></script>
  124. <script src="../scripts/page.js"></script>
  125. </body>
  126. </html>
粤ICP备19079148号