AtomicFunctionNode.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>AtomicFunctionNode - 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">AtomicFunctionNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p><code>AtomicFunctionNode</code> represents any function that can operate on atomic variable types
  17. within a shader. In an atomic function, any modification to an atomic variable will
  18. occur as an indivisible step with a defined order relative to other modifications.
  19. Accordingly, even if multiple atomic functions are modifying an atomic variable at once
  20. atomic operations will not interfere with each other.</p>
  21. <p>This node can only be used with a WebGPU backend.</p></div>
  22. </header>
  23. <article>
  24. <div class="container-overview">
  25. <h2>Constructor</h2>
  26. <h3 class="name name-method" id="AtomicFunctionNode" translate="no">new <a href="#AtomicFunctionNode">AtomicFunctionNode</a><span class="signature">( method : <span class="param-type">string</span>, pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  27. <div class="method">
  28. <div class="description">
  29. <p>Constructs a new atomic function node.</p>
  30. </div>
  31. <table class="params">
  32. <tbody>
  33. <tr>
  34. <td class="name">
  35. <strong>method</strong>
  36. </td>
  37. <td class="description last">
  38. <p>The signature of the atomic function to construct.</p>
  39. </td>
  40. </tr>
  41. <tr>
  42. <td class="name">
  43. <strong>pointerNode</strong>
  44. </td>
  45. <td class="description last">
  46. <p>An atomic variable or element of an atomic buffer.</p>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td class="name">
  51. <strong>valueNode</strong>
  52. </td>
  53. <td class="description last">
  54. <p>The value that mutates the atomic variable.</p>
  55. </td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. </div>
  60. </div>
  61. <h2 class="subsection-title">Properties</h2>
  62. <div class="member">
  63. <h3 class="name" id="method" translate="no">.<a href="#method">method</a><span class="type-signature"> : string</span> </h3>
  64. <div class="description">
  65. <p>The signature of the atomic function to construct.</p>
  66. </div>
  67. </div>
  68. <div class="member">
  69. <h3 class="name" id="parents" translate="no">.<a href="#parents">parents</a><span class="type-signature"> : boolean</span> </h3>
  70. <div class="description">
  71. <p>Creates a list of the parents for this node for detecting if the node needs to return a value.</p>
  72. <p>Default is <code>true</code>.</p>
  73. </div>
  74. <dl class="details">
  75. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#parents">Node#parents</a></dt>
  76. </dl>
  77. </div>
  78. <div class="member">
  79. <h3 class="name" id="pointerNode" translate="no">.<a href="#pointerNode">pointerNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  80. <div class="description">
  81. <p>An atomic variable or element of an atomic buffer.</p>
  82. </div>
  83. </div>
  84. <div class="member">
  85. <h3 class="name" id="valueNode" translate="no">.<a href="#valueNode">valueNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  86. <div class="description">
  87. <p>A value that modifies the atomic variable.</p>
  88. </div>
  89. </div>
  90. <h2 class="subsection-title">Methods</h2>
  91. <h3 class="name name-method" id="getInputType" translate="no">.<a href="#getInputType">getInputType</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
  92. <div class="method">
  93. <div class="description">
  94. <p>Overwrites the default implementation to return the type of
  95. the pointer node.</p>
  96. </div>
  97. <table class="params">
  98. <tbody>
  99. <tr>
  100. <td class="name">
  101. <strong>builder</strong>
  102. </td>
  103. <td class="description last">
  104. <p>The current node builder.</p>
  105. </td>
  106. </tr>
  107. </tbody>
  108. </table>
  109. <dl class="details">
  110. <dt class="tag-returns"><strong>Returns:</strong> The input type.</dt>
  111. </dl>
  112. </div>
  113. <h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
  114. <div class="method">
  115. <div class="description">
  116. <p>Overwritten since the node type is inferred from the input type.</p>
  117. </div>
  118. <table class="params">
  119. <tbody>
  120. <tr>
  121. <td class="name">
  122. <strong>builder</strong>
  123. </td>
  124. <td class="description last">
  125. <p>The current node builder.</p>
  126. </td>
  127. </tr>
  128. </tbody>
  129. </table>
  130. <dl class="details">
  131. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  132. </dl>
  133. <dl class="details">
  134. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  135. </dl>
  136. </div>
  137. <h2 class="subsection-title">Source</h2>
  138. <p>
  139. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/gpgpu/AtomicFunctionNode.js" translate="no" target="_blank" rel="noopener">src/nodes/gpgpu/AtomicFunctionNode.js</a>
  140. </p>
  141. </article>
  142. </section>
  143. <script src="../scripts/linenumber.js"></script>
  144. <script src="../scripts/page.js"></script>
  145. </body>
  146. </html>
粤ICP备19079148号