ComputeBuiltinNode.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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"><code>builtinName</code></td>
  32. <td class="description last"><p>The built-in name.</p></td>
  33. </tr>
  34. <tr>
  35. <td class="name"><code>nodeType</code></td>
  36. <td class="description last"><p>The node type.</p></td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. </div>
  41. </div>
  42. <h2 class="subsection-title">Methods</h2>
  43. <h3 class="name name-method" id="getBuiltinName" translate="no">.<a href="#getBuiltinName">getBuiltinName</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
  44. <div class="method">
  45. <div class="description">
  46. <p>Returns the builtin name.</p>
  47. </div>
  48. <table class="params">
  49. <tbody>
  50. <tr>
  51. <td class="name"><code>builder</code></td>
  52. <td class="description last"><p>The current node builder.</p></td>
  53. </tr>
  54. </tbody>
  55. </table>
  56. <dl class="details">
  57. <dt class="tag-returns"><strong>Returns:</strong> The builtin name.</dt>
  58. </dl>
  59. </div>
  60. <h3 class="name name-method" id="getHash" translate="no">.<a href="#getHash">getHash</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
  61. <div class="method">
  62. <div class="description">
  63. <p>This method is overwritten since hash is derived from the built-in name.</p>
  64. </div>
  65. <table class="params">
  66. <tbody>
  67. <tr>
  68. <td class="name"><code>builder</code></td>
  69. <td class="description last"><p>The current node builder.</p></td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. <dl class="details">
  74. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getHash">Node#getHash</a></dt>
  75. </dl>
  76. <dl class="details">
  77. <dt class="tag-returns"><strong>Returns:</strong> The hash.</dt>
  78. </dl>
  79. </div>
  80. <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>
  81. <div class="method">
  82. <div class="description">
  83. <p>This method is overwritten since the node type is simply derived from <code>nodeType</code>..</p>
  84. </div>
  85. <table class="params">
  86. <tbody>
  87. <tr>
  88. <td class="name"><code>builder</code></td>
  89. <td class="description last"><p>The current node builder.</p></td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. <dl class="details">
  94. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  95. </dl>
  96. <dl class="details">
  97. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  98. </dl>
  99. </div>
  100. <h3 class="name name-method" id="hasBuiltin" translate="no">.<a href="#hasBuiltin">hasBuiltin</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : boolean</span> </h3>
  101. <div class="method">
  102. <div class="description">
  103. <p>Whether the current node builder has the builtin or not.</p>
  104. </div>
  105. <table class="params">
  106. <tbody>
  107. <tr>
  108. <td class="name"><code>builder</code></td>
  109. <td class="description last"><p>The current node builder.</p></td>
  110. </tr>
  111. </tbody>
  112. </table>
  113. <dl class="details">
  114. <dt class="tag-returns"><strong>Returns:</strong> Whether the builder has the builtin or not.</dt>
  115. </dl>
  116. </div>
  117. <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>
  118. <div class="method">
  119. <div class="description">
  120. <p>Sets the builtin name.</p>
  121. </div>
  122. <table class="params">
  123. <tbody>
  124. <tr>
  125. <td class="name"><code>builtinName</code></td>
  126. <td class="description last"><p>The built-in name.</p></td>
  127. </tr>
  128. </tbody>
  129. </table>
  130. <dl class="details">
  131. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  132. </dl>
  133. </div>
  134. <h2 class="subsection-title">Source</h2>
  135. <p>
  136. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/gpgpu/ComputeBuiltinNode.js" target="_blank" rel="noopener" translate="no">src/nodes/gpgpu/ComputeBuiltinNode.js</a>
  137. </p>
  138. </article>
  139. </section>
  140. <script src="../scripts/linenumber.js"></script>
  141. <script src="../scripts/page.js"></script>
  142. </body>
  143. </html>
粤ICP备19079148号