IndexNode.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>IndexNode - 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">IndexNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This class represents shader indices of different types. The following predefined node
  17. objects cover frequent use cases:</p>
  18. <ul>
  19. <li><code>vertexIndex</code>: The index of a vertex within a mesh.</li>
  20. <li><code>instanceIndex</code>: The index of either a mesh instance or an invocation of a compute shader.</li>
  21. <li><code>drawIndex</code>: The index of a draw call.</li>
  22. <li><code>invocationLocalIndex</code>: The index of a compute invocation within the scope of a workgroup load.</li>
  23. <li><code>invocationSubgroupIndex</code>: The index of a compute invocation within the scope of a subgroup.</li>
  24. <li><code>subgroupIndex</code>: The index of a compute invocation's subgroup within its workgroup.</li>
  25. </ul></div>
  26. </header>
  27. <article>
  28. <div class="container-overview">
  29. <h2>Constructor</h2>
  30. <h3 class="name name-method" id="IndexNode" translate="no">new <a href="#IndexNode">IndexNode</a><span class="signature">( scope : <span class="param-type">'vertex' | 'instance' | 'subgroup' | 'invocationLocal' | 'invocationGlobal' | 'invocationSubgroup' | 'draw'</span> )</span> </h3>
  31. <div class="method">
  32. <div class="description">
  33. <p>Constructs a new index node.</p>
  34. </div>
  35. <table class="params">
  36. <tbody>
  37. <tr>
  38. <td class="name">
  39. <strong>scope</strong>
  40. </td>
  41. <td class="description last">
  42. <p>The scope of the index node.</p>
  43. </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="isIndexNode" translate="no">.<a href="#isIndexNode">isIndexNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  52. <div class="description">
  53. <p>This flag can be used for type testing.</p>
  54. <p>Default is <code>true</code>.</p>
  55. </div>
  56. </div>
  57. <div class="member">
  58. <h3 class="name" id="scope" translate="no">.<a href="#scope">scope</a><span class="type-signature"> : string</span> </h3>
  59. <div class="description">
  60. <p>The scope of the index node.</p>
  61. </div>
  62. </div>
  63. <h2 class="subsection-title">Source</h2>
  64. <p>
  65. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/IndexNode.js" translate="no" target="_blank" rel="noopener">src/nodes/core/IndexNode.js</a>
  66. </p>
  67. </article>
  68. </section>
  69. <script src="../scripts/linenumber.js"></script>
  70. <script src="../scripts/page.js"></script>
  71. </body>
  72. </html>
粤ICP备19079148号