WorkgroupInfoNode.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>WorkgroupInfoNode - 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">WorkgroupInfoNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A node allowing the user to create a 'workgroup' scoped buffer within the
  17. context of a compute shader. Typically, workgroup scoped buffers are
  18. created to hold data that is transferred from a global storage scope into
  19. a local workgroup scope. For invocations within a workgroup, data
  20. access speeds on 'workgroup' scoped buffers can be significantly faster
  21. than similar access operations on globally accessible storage buffers.</p>
  22. <p>This node can only be used with a WebGPU backend.</p></div>
  23. </header>
  24. <article>
  25. <div class="container-overview">
  26. <h2>Constructor</h2>
  27. <h3 class="name name-method" id="WorkgroupInfoNode" translate="no">new <a href="#WorkgroupInfoNode">WorkgroupInfoNode</a><span class="signature">( scope : <span class="param-type">string</span>, bufferType : <span class="param-type">string</span>, bufferCount : <span class="param-type">number</span> )</span> </h3>
  28. <div class="method">
  29. <div class="description">
  30. <p>Constructs a new buffer scoped to type scope.</p>
  31. </div>
  32. <table class="params">
  33. <tbody>
  34. <tr>
  35. <td class="name"><code>scope</code></td>
  36. <td class="description last"><p>TODO.</p></td>
  37. </tr>
  38. <tr>
  39. <td class="name"><code>bufferType</code></td>
  40. <td class="description last"><p>The data type of a 'workgroup' scoped buffer element.</p></td>
  41. </tr>
  42. <tr>
  43. <td class="name"><code>bufferCount</code></td>
  44. <td class="description last"><p>The number of elements in the buffer.<br/>Default is <code>0</code>.</p></td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. </div>
  49. </div>
  50. <h2 class="subsection-title">Properties</h2>
  51. <div class="member">
  52. <h3 class="name" id="bufferCount" translate="no">.<a href="#bufferCount">bufferCount</a><span class="type-signature"> : number</span> </h3>
  53. <div class="description">
  54. <p>The buffer count.<br/>Default is <code>0</code>.</p>
  55. </div>
  56. </div>
  57. <div class="member">
  58. <h3 class="name" id="bufferType" translate="no">.<a href="#bufferType">bufferType</a><span class="type-signature"> : string</span> </h3>
  59. <div class="description">
  60. <p>The buffer type.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <h3 class="name" id="elementType" translate="no">.<a href="#elementType">elementType</a><span class="type-signature"> : string</span> </h3>
  65. <div class="description">
  66. <p>The data type of the array buffer.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="isWorkgroupInfoNode" translate="no">.<a href="#isWorkgroupInfoNode">isWorkgroupInfoNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  71. <div class="description">
  72. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  73. </div>
  74. </div>
  75. <div class="member">
  76. <h3 class="name" id="name" translate="no">.<a href="#name">name</a><span class="type-signature"> : string</span> </h3>
  77. <div class="description">
  78. <p>The name of the workgroup scoped buffer.<br/>Default is <code>''</code>.</p>
  79. </div>
  80. <dl class="details">
  81. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#name">Node#name</a></dt>
  82. </dl>
  83. </div>
  84. <div class="member">
  85. <h3 class="name" id="scope" translate="no">.<a href="#scope">scope</a><span class="type-signature"> : string</span> </h3>
  86. <div class="description">
  87. <p>TODO.</p>
  88. </div>
  89. </div>
  90. <h2 class="subsection-title">Methods</h2>
  91. <h3 class="name name-method" id="element" translate="no">.<a href="#element">element</a><span class="signature">( indexNode : <span class="param-type">IndexNode</span> )</span><span class="type-signature"> : <a href="WorkgroupInfoElementNode.html">WorkgroupInfoElementNode</a></span> </h3>
  92. <div class="method">
  93. <div class="description">
  94. <p>This method can be used to access elements via an index node.</p>
  95. </div>
  96. <table class="params">
  97. <tbody>
  98. <tr>
  99. <td class="name"><code>indexNode</code></td>
  100. <td class="description last"><p>indexNode.</p></td>
  101. </tr>
  102. </tbody>
  103. </table>
  104. <dl class="details">
  105. <dt class="tag-returns"><strong>Returns:</strong> A reference to an element.</dt>
  106. </dl>
  107. </div>
  108. <h3 class="name name-method" id="getElementType" translate="no">.<a href="#getElementType">getElementType</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
  109. <div class="method">
  110. <div class="description">
  111. <p>The data type of the array buffer.</p>
  112. </div>
  113. <dl class="details">
  114. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getElementType">Node#getElementType</a></dt>
  115. </dl>
  116. <dl class="details">
  117. <dt class="tag-returns"><strong>Returns:</strong> The element type.</dt>
  118. </dl>
  119. </div>
  120. <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>
  121. <div class="method">
  122. <div class="description">
  123. <p>Overwrites the default implementation since the input type
  124. is inferred from the scope.</p>
  125. </div>
  126. <table class="params">
  127. <tbody>
  128. <tr>
  129. <td class="name"><code>builder</code></td>
  130. <td class="description last"><p>The current node builder.</p></td>
  131. </tr>
  132. </tbody>
  133. </table>
  134. <dl class="details">
  135. <dt class="tag-returns"><strong>Returns:</strong> The input type.</dt>
  136. </dl>
  137. </div>
  138. <h3 class="name name-method" id="label" translate="no">.<a href="#label">label</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="WorkgroupInfoNode.html">WorkgroupInfoNode</a></span> </h3>
  139. <div class="method">
  140. <div class="description">
  141. <p>Sets the name/label of this node.</p>
  142. </div>
  143. <table class="params">
  144. <tbody>
  145. <tr>
  146. <td class="name"><code>name</code></td>
  147. <td class="description last"><p>The name to set.</p></td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. <dl class="details">
  152. <dt class="important tag-deprecated"><strong>Deprecated:</strong> Yes</dt>
  153. </dl>
  154. <dl class="details">
  155. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  156. </dl>
  157. </div>
  158. <h3 class="name name-method" id="setName" translate="no">.<a href="#setName">setName</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="WorkgroupInfoNode.html">WorkgroupInfoNode</a></span> </h3>
  159. <div class="method">
  160. <div class="description">
  161. <p>Sets the name of this node.</p>
  162. </div>
  163. <table class="params">
  164. <tbody>
  165. <tr>
  166. <td class="name"><code>name</code></td>
  167. <td class="description last"><p>The name to set.</p></td>
  168. </tr>
  169. </tbody>
  170. </table>
  171. <dl class="details">
  172. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  173. </dl>
  174. </div>
  175. <h3 class="name name-method" id="setScope" translate="no">.<a href="#setScope">setScope</a><span class="signature">( scope : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="WorkgroupInfoNode.html">WorkgroupInfoNode</a></span> </h3>
  176. <div class="method">
  177. <div class="description">
  178. <p>Sets the scope of this node.</p>
  179. </div>
  180. <table class="params">
  181. <tbody>
  182. <tr>
  183. <td class="name"><code>scope</code></td>
  184. <td class="description last"><p>The scope to set.</p></td>
  185. </tr>
  186. </tbody>
  187. </table>
  188. <dl class="details">
  189. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  190. </dl>
  191. </div>
  192. <h2 class="subsection-title">Source</h2>
  193. <p>
  194. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/gpgpu/WorkgroupInfoNode.js" target="_blank" rel="noopener" translate="no">src/nodes/gpgpu/WorkgroupInfoNode.js</a>
  195. </p>
  196. </article>
  197. </section>
  198. <script src="../scripts/linenumber.js"></script>
  199. <script src="../scripts/page.js"></script>
  200. </body>
  201. </html>
粤ICP备19079148号