WorkgroupInfoNode.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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">
  36. <strong>scope</strong>
  37. </td>
  38. <td class="description last">
  39. <p>TODO.</p>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td class="name">
  44. <strong>bufferType</strong>
  45. </td>
  46. <td class="description last">
  47. <p>The data type of a 'workgroup' scoped buffer element.</p>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td class="name">
  52. <strong>bufferCount</strong>
  53. </td>
  54. <td class="description last">
  55. <p>The number of elements in the buffer.</p>
  56. <p>Default is <code>0</code>.</p>
  57. </td>
  58. </tr>
  59. </tbody>
  60. </table>
  61. </div>
  62. </div>
  63. <h2 class="subsection-title">Properties</h2>
  64. <div class="member">
  65. <h3 class="name" id="bufferCount" translate="no">.<a href="#bufferCount">bufferCount</a><span class="type-signature"> : number</span> </h3>
  66. <div class="description">
  67. <p>The buffer count.</p>
  68. <p>Default is <code>0</code>.</p>
  69. </div>
  70. </div>
  71. <div class="member">
  72. <h3 class="name" id="bufferType" translate="no">.<a href="#bufferType">bufferType</a><span class="type-signature"> : string</span> </h3>
  73. <div class="description">
  74. <p>The buffer type.</p>
  75. </div>
  76. </div>
  77. <div class="member">
  78. <h3 class="name" id="elementType" translate="no">.<a href="#elementType">elementType</a><span class="type-signature"> : string</span> </h3>
  79. <div class="description">
  80. <p>The data type of the array buffer.</p>
  81. </div>
  82. </div>
  83. <div class="member">
  84. <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>
  85. <div class="description">
  86. <p>This flag can be used for type testing.</p>
  87. <p>Default is <code>true</code>.</p>
  88. </div>
  89. </div>
  90. <div class="member">
  91. <h3 class="name" id="name" translate="no">.<a href="#name">name</a><span class="type-signature"> : string</span> </h3>
  92. <div class="description">
  93. <p>The name of the workgroup scoped buffer.</p>
  94. <p>Default is <code>''</code>.</p>
  95. </div>
  96. <dl class="details">
  97. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#name">Node#name</a></dt>
  98. </dl>
  99. </div>
  100. <div class="member">
  101. <h3 class="name" id="scope" translate="no">.<a href="#scope">scope</a><span class="type-signature"> : string</span> </h3>
  102. <div class="description">
  103. <p>TODO.</p>
  104. </div>
  105. </div>
  106. <h2 class="subsection-title">Methods</h2>
  107. <h3 class="name name-method" id="element" translate="no">.<a href="#element">element</a><span class="signature">( indexNode : <span class="param-type"><a href="IndexNode.html">IndexNode</a></span> )</span><span class="type-signature"> : <a href="WorkgroupInfoElementNode.html">WorkgroupInfoElementNode</a></span> </h3>
  108. <div class="method">
  109. <div class="description">
  110. <p>This method can be used to access elements via an index node.</p>
  111. </div>
  112. <table class="params">
  113. <tbody>
  114. <tr>
  115. <td class="name">
  116. <strong>indexNode</strong>
  117. </td>
  118. <td class="description last">
  119. <p>indexNode.</p>
  120. </td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. <dl class="details">
  125. <dt class="tag-returns"><strong>Returns:</strong> A reference to an element.</dt>
  126. </dl>
  127. </div>
  128. <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>
  129. <div class="method">
  130. <div class="description">
  131. <p>The data type of the array buffer.</p>
  132. </div>
  133. <dl class="details">
  134. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getElementType">Node#getElementType</a></dt>
  135. </dl>
  136. <dl class="details">
  137. <dt class="tag-returns"><strong>Returns:</strong> The element type.</dt>
  138. </dl>
  139. </div>
  140. <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>
  141. <div class="method">
  142. <div class="description">
  143. <p>Overwrites the default implementation since the input type
  144. is inferred from the scope.</p>
  145. </div>
  146. <table class="params">
  147. <tbody>
  148. <tr>
  149. <td class="name">
  150. <strong>builder</strong>
  151. </td>
  152. <td class="description last">
  153. <p>The current node builder.</p>
  154. </td>
  155. </tr>
  156. </tbody>
  157. </table>
  158. <dl class="details">
  159. <dt class="tag-returns"><strong>Returns:</strong> The input type.</dt>
  160. </dl>
  161. </div>
  162. <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>
  163. <div class="method">
  164. <div class="description">
  165. <p>Sets the name/label of this node.</p>
  166. </div>
  167. <table class="params">
  168. <tbody>
  169. <tr>
  170. <td class="name">
  171. <strong>name</strong>
  172. </td>
  173. <td class="description last">
  174. <p>The name to set.</p>
  175. </td>
  176. </tr>
  177. </tbody>
  178. </table>
  179. <dl class="details">
  180. <dt class="important tag-deprecated"><strong>Deprecated:</strong> Yes</dt>
  181. </dl>
  182. <dl class="details">
  183. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  184. </dl>
  185. </div>
  186. <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>
  187. <div class="method">
  188. <div class="description">
  189. <p>Sets the name of this node.</p>
  190. </div>
  191. <table class="params">
  192. <tbody>
  193. <tr>
  194. <td class="name">
  195. <strong>name</strong>
  196. </td>
  197. <td class="description last">
  198. <p>The name to set.</p>
  199. </td>
  200. </tr>
  201. </tbody>
  202. </table>
  203. <dl class="details">
  204. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  205. </dl>
  206. </div>
  207. <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>
  208. <div class="method">
  209. <div class="description">
  210. <p>Sets the scope of this node.</p>
  211. </div>
  212. <table class="params">
  213. <tbody>
  214. <tr>
  215. <td class="name">
  216. <strong>scope</strong>
  217. </td>
  218. <td class="description last">
  219. <p>The scope to set.</p>
  220. </td>
  221. </tr>
  222. </tbody>
  223. </table>
  224. <dl class="details">
  225. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  226. </dl>
  227. </div>
  228. <h2 class="subsection-title">Source</h2>
  229. <p>
  230. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/gpgpu/WorkgroupInfoNode.js" translate="no" target="_blank" rel="noopener">src/nodes/gpgpu/WorkgroupInfoNode.js</a>
  231. </p>
  232. </article>
  233. </section>
  234. <script src="../scripts/linenumber.js"></script>
  235. <script src="../scripts/page.js"></script>
  236. </body>
  237. </html>
粤ICP备19079148号