StructTypeNode.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>StructTypeNode - 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">StructTypeNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Represents a struct type node in the node-based system.
  17. This class is used to define and manage the layout and types of struct members.
  18. It extends the base Node class and provides methods to get the length of the struct,
  19. retrieve member types, and generate the struct type for a builder.</p></div>
  20. </header>
  21. <article>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="StructTypeNode" translate="no">new <a href="#StructTypeNode">StructTypeNode</a><span class="signature">( membersLayout : <span class="param-type">Object</span>, name : <span class="param-type">string</span> )</span> </h3>
  25. <div class="method">
  26. <div class="description">
  27. <p>Creates an instance of StructTypeNode.</p>
  28. </div>
  29. <table class="params">
  30. <tbody>
  31. <tr>
  32. <td class="name">
  33. <strong>membersLayout</strong>
  34. </td>
  35. <td class="description last">
  36. <p>The layout of the members for the struct.</p>
  37. </td>
  38. </tr>
  39. <tr>
  40. <td class="name">
  41. <strong>name</strong>
  42. </td>
  43. <td class="description last">
  44. <p>The optional name of the struct.</p>
  45. <p>Default is <code>null</code>.</p>
  46. </td>
  47. </tr>
  48. </tbody>
  49. </table>
  50. </div>
  51. </div>
  52. <h2 class="subsection-title">Properties</h2>
  53. <div class="member">
  54. <h3 class="name" id="isStructLayoutNode" translate="no">.<a href="#isStructLayoutNode">isStructLayoutNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  55. <div class="description">
  56. <p>This flag can be used for type testing.</p>
  57. <p>Default is <code>true</code>.</p>
  58. </div>
  59. </div>
  60. <div class="member">
  61. <h3 class="name" id="membersLayout" translate="no">.<a href="#membersLayout">membersLayout</a><span class="type-signature"> : Array.&lt;{name: string, type: string, atomic: boolean}></span> </h3>
  62. <div class="description">
  63. <p>The layout of the members for the struct</p>
  64. </div>
  65. </div>
  66. <div class="member">
  67. <h3 class="name" id="name" translate="no">.<a href="#name">name</a><span class="type-signature"> : string</span> </h3>
  68. <div class="description">
  69. <p>The name of the struct.</p>
  70. <p>Default is <code>null</code>.</p>
  71. </div>
  72. <dl class="details">
  73. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#name">Node#name</a></dt>
  74. </dl>
  75. </div>
  76. <h2 class="subsection-title">Methods</h2>
  77. <h3 class="name name-method" id="getLength" translate="no">.<a href="#getLength">getLength</a><span class="signature">()</span><span class="type-signature"> : number</span> </h3>
  78. <div class="method">
  79. <div class="description">
  80. <p>Returns the length of the struct.
  81. The length is calculated by summing the lengths of the struct's members.</p>
  82. </div>
  83. <dl class="details">
  84. <dt class="tag-returns"><strong>Returns:</strong> The length of the struct.</dt>
  85. </dl>
  86. </div>
  87. <h2 class="subsection-title">Source</h2>
  88. <p>
  89. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/StructTypeNode.js" translate="no" target="_blank" rel="noopener">src/nodes/core/StructTypeNode.js</a>
  90. </p>
  91. </article>
  92. </section>
  93. <script src="../scripts/linenumber.js"></script>
  94. <script src="../scripts/page.js"></script>
  95. </body>
  96. </html>
粤ICP备19079148号