RGBShiftNode.html 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>RGBShiftNode - 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">RGBShiftNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Post processing node for shifting/splitting RGB color channels. The effect
  17. separates color channels and offsets them from each other.</p></div>
  18. </header>
  19. <article>
  20. <h2 class="subsection-title">Import</h2>
  21. <p><span translate="no">RGBShiftNode</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  22. <pre><code class="language-js">import { rgbShift } from 'three/addons/tsl/display/RGBShiftNode.js';</code></pre>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="RGBShiftNode" translate="no">new <a href="#RGBShiftNode">RGBShiftNode</a><span class="signature">( textureNode : <span class="param-type">TextureNode</span>, amount : <span class="param-type">number</span>, angle : <span class="param-type">number</span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new RGB shift node.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name"><code>textureNode</code></td>
  34. <td class="description last"><p>The texture node that represents the input of the effect.</p></td>
  35. </tr>
  36. <tr>
  37. <td class="name"><code>amount</code></td>
  38. <td class="description last"><p>The amount of the RGB shift.<br/>Default is <code>0.005</code>.</p></td>
  39. </tr>
  40. <tr>
  41. <td class="name"><code>angle</code></td>
  42. <td class="description last"><p>Defines the orientation in which colors are shifted.<br/>Default is <code>0</code>.</p></td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. <h2 class="subsection-title">Properties</h2>
  49. <div class="member">
  50. <h3 class="name" id="amount" translate="no">.<a href="#amount">amount</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> </h3>
  51. <div class="description">
  52. <p>The amount of the RGB shift.</p>
  53. </div>
  54. </div>
  55. <div class="member">
  56. <h3 class="name" id="angle" translate="no">.<a href="#angle">angle</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> </h3>
  57. <div class="description">
  58. <p>Defines in which direction colors are shifted.</p>
  59. </div>
  60. </div>
  61. <div class="member">
  62. <h3 class="name" id="textureNode" translate="no">.<a href="#textureNode">textureNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  63. <div class="description">
  64. <p>The texture node that represents the input of the effect.</p>
  65. </div>
  66. </div>
  67. <h2 class="subsection-title">Methods</h2>
  68. <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>
  69. <div class="method">
  70. <div class="description">
  71. <p>This method is used to setup the effect's TSL code.</p>
  72. </div>
  73. <table class="params">
  74. <tbody>
  75. <tr>
  76. <td class="name"><code>builder</code></td>
  77. <td class="description last"><p>The current node builder.</p></td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. <dl class="details">
  82. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#setup">TempNode#setup</a></dt>
  83. </dl>
  84. <dl class="details">
  85. <dt class="tag-returns"><strong>Returns:</strong> </dt>
  86. </dl>
  87. </div>
  88. <h2 class="subsection-title">Source</h2>
  89. <p>
  90. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/RGBShiftNode.js" target="_blank" rel="noopener" translate="no">examples/jsm/tsl/display/RGBShiftNode.js</a>
  91. </p>
  92. </article>
  93. </section>
  94. <script src="../scripts/linenumber.js"></script>
  95. <script src="../scripts/page.js"></script>
  96. </body>
  97. </html>
粤ICP备19079148号