AtomicFunctionNode.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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">Node</span>, valueNode : <span class="param-type">Node</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"><code>method</code></td>
  35. <td class="description last"><p>The signature of the atomic function to construct.</p></td>
  36. </tr>
  37. <tr>
  38. <td class="name"><code>pointerNode</code></td>
  39. <td class="description last"><p>An atomic variable or element of an atomic buffer.</p></td>
  40. </tr>
  41. <tr>
  42. <td class="name"><code>valueNode</code></td>
  43. <td class="description last"><p>The value that mutates the atomic variable.</p></td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. </div>
  48. </div>
  49. <h2 class="subsection-title">Properties</h2>
  50. <div class="member">
  51. <h3 class="name" id="method" translate="no">.<a href="#method">method</a><span class="type-signature"> : string</span> </h3>
  52. <div class="description">
  53. <p>The signature of the atomic function to construct.</p>
  54. </div>
  55. </div>
  56. <div class="member">
  57. <h3 class="name" id="parents" translate="no">.<a href="#parents">parents</a><span class="type-signature"> : boolean</span> </h3>
  58. <div class="description">
  59. <p>Creates a list of the parents for this node for detecting if the node needs to return a value.<br/>Default is <code>true</code>.</p>
  60. </div>
  61. <dl class="details">
  62. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#parents">Node#parents</a></dt>
  63. </dl>
  64. </div>
  65. <div class="member">
  66. <h3 class="name" id="pointerNode" translate="no">.<a href="#pointerNode">pointerNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  67. <div class="description">
  68. <p>An atomic variable or element of an atomic buffer.</p>
  69. </div>
  70. </div>
  71. <div class="member">
  72. <h3 class="name" id="valueNode" translate="no">.<a href="#valueNode">valueNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  73. <div class="description">
  74. <p>A value that modifies the atomic variable.</p>
  75. </div>
  76. </div>
  77. <h2 class="subsection-title">Methods</h2>
  78. <h3 class="name name-method" id="getInputType" translate="no">.<a href="#getInputType">getInputType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
  79. <div class="method">
  80. <div class="description">
  81. <p>Overwrites the default implementation to return the type of
  82. the pointer node.</p>
  83. </div>
  84. <table class="params">
  85. <tbody>
  86. <tr>
  87. <td class="name"><code>builder</code></td>
  88. <td class="description last"><p>The current node builder.</p></td>
  89. </tr>
  90. </tbody>
  91. </table>
  92. <dl class="details">
  93. <dt class="tag-returns"><strong>Returns:</strong> The input type.</dt>
  94. </dl>
  95. </div>
  96. <h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
  97. <div class="method">
  98. <div class="description">
  99. <p>Overwritten since the node type is inferred from the input type.</p>
  100. </div>
  101. <table class="params">
  102. <tbody>
  103. <tr>
  104. <td class="name"><code>builder</code></td>
  105. <td class="description last"><p>The current node builder.</p></td>
  106. </tr>
  107. </tbody>
  108. </table>
  109. <dl class="details">
  110. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  111. </dl>
  112. <dl class="details">
  113. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  114. </dl>
  115. </div>
  116. <h2 class="subsection-title">Source</h2>
  117. <p>
  118. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/gpgpu/AtomicFunctionNode.js" target="_blank" rel="noopener" translate="no">src/nodes/gpgpu/AtomicFunctionNode.js</a>
  119. </p>
  120. </article>
  121. </section>
  122. <script src="../scripts/linenumber.js"></script>
  123. <script src="../scripts/page.js"></script>
  124. </body>
  125. </html>
粤ICP备19079148号