1
0

ComputeBuiltinNode.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ComputeBuiltinNode - 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">ComputeBuiltinNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p><code>ComputeBuiltinNode</code> represents a compute-scope builtin value that expose information
  17. about the currently running dispatch and/or the device it is running on.</p>
  18. <p>This node can only be used with a WebGPU backend.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="ComputeBuiltinNode" translate="no">new <a href="#ComputeBuiltinNode">ComputeBuiltinNode</a><span class="signature">( builtinName : <span class="param-type">string</span>, nodeType : <span class="param-type">string</span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new compute builtin node.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name">
  32. <strong>builtinName</strong>
  33. </td>
  34. <td class="description last">
  35. <p>The built-in name.</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class="name">
  40. <strong>nodeType</strong>
  41. </td>
  42. <td class="description last">
  43. <p>The node type.</p>
  44. </td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. </div>
  49. </div>
  50. <h2 class="subsection-title">Methods</h2>
  51. <h3 class="name name-method" id="getBuiltinName" translate="no">.<a href="#getBuiltinName">getBuiltinName</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
  52. <div class="method">
  53. <div class="description">
  54. <p>Returns the builtin name.</p>
  55. </div>
  56. <table class="params">
  57. <tbody>
  58. <tr>
  59. <td class="name">
  60. <strong>builder</strong>
  61. </td>
  62. <td class="description last">
  63. <p>The current node builder.</p>
  64. </td>
  65. </tr>
  66. </tbody>
  67. </table>
  68. <dl class="details">
  69. <dt class="tag-returns"><strong>Returns:</strong> The builtin name.</dt>
  70. </dl>
  71. </div>
  72. <h3 class="name name-method" id="getHash" translate="no">.<a href="#getHash">getHash</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
  73. <div class="method">
  74. <div class="description">
  75. <p>This method is overwritten since hash is derived from the built-in name.</p>
  76. </div>
  77. <table class="params">
  78. <tbody>
  79. <tr>
  80. <td class="name">
  81. <strong>builder</strong>
  82. </td>
  83. <td class="description last">
  84. <p>The current node builder.</p>
  85. </td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. <dl class="details">
  90. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getHash">Node#getHash</a></dt>
  91. </dl>
  92. <dl class="details">
  93. <dt class="tag-returns"><strong>Returns:</strong> The hash.</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"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
  97. <div class="method">
  98. <div class="description">
  99. <p>This method is overwritten since the node type is simply derived from <code>nodeType</code>..</p>
  100. </div>
  101. <table class="params">
  102. <tbody>
  103. <tr>
  104. <td class="name">
  105. <strong>builder</strong>
  106. </td>
  107. <td class="description last">
  108. <p>The current node builder.</p>
  109. </td>
  110. </tr>
  111. </tbody>
  112. </table>
  113. <dl class="details">
  114. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  115. </dl>
  116. <dl class="details">
  117. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  118. </dl>
  119. </div>
  120. <h3 class="name name-method" id="hasBuiltin" translate="no">.<a href="#hasBuiltin">hasBuiltin</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : boolean</span> </h3>
  121. <div class="method">
  122. <div class="description">
  123. <p>Whether the current node builder has the builtin or not.</p>
  124. </div>
  125. <table class="params">
  126. <tbody>
  127. <tr>
  128. <td class="name">
  129. <strong>builder</strong>
  130. </td>
  131. <td class="description last">
  132. <p>The current node builder.</p>
  133. </td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. <dl class="details">
  138. <dt class="tag-returns"><strong>Returns:</strong> Whether the builder has the builtin or not.</dt>
  139. </dl>
  140. </div>
  141. <h3 class="name name-method" id="setBuiltinName" translate="no">.<a href="#setBuiltinName">setBuiltinName</a><span class="signature">( builtinName : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="ComputeBuiltinNode.html">ComputeBuiltinNode</a></span> </h3>
  142. <div class="method">
  143. <div class="description">
  144. <p>Sets the builtin name.</p>
  145. </div>
  146. <table class="params">
  147. <tbody>
  148. <tr>
  149. <td class="name">
  150. <strong>builtinName</strong>
  151. </td>
  152. <td class="description last">
  153. <p>The built-in name.</p>
  154. </td>
  155. </tr>
  156. </tbody>
  157. </table>
  158. <dl class="details">
  159. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  160. </dl>
  161. </div>
  162. <h2 class="subsection-title">Source</h2>
  163. <p>
  164. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/gpgpu/ComputeBuiltinNode.js" translate="no" target="_blank" rel="noopener">src/nodes/gpgpu/ComputeBuiltinNode.js</a>
  165. </p>
  166. </article>
  167. </section>
  168. <script src="../scripts/linenumber.js"></script>
  169. <script src="../scripts/page.js"></script>
  170. </body>
  171. </html>
粤ICP备19079148号