UniformGroupNode.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>UniformGroupNode - 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">UniformGroupNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This node can be used to group single instances of <a href="UniformNode.html">UniformNode</a>
  17. and manage them as a uniform buffer.</p>
  18. <p>In most cases, the predefined nodes <code>objectGroup</code>, <code>renderGroup</code> and <code>frameGroup</code>
  19. will be used when defining the <a href="UniformNode.html#groupNode">UniformNode#groupNode</a> property.</p>
  20. <ul>
  21. <li><code>objectGroup</code>: Uniform buffer per object.</li>
  22. <li><code>renderGroup</code>: Shared uniform buffer, updated once per render call.</li>
  23. <li><code>frameGroup</code>: Shared uniform buffer, updated once per frame.</li>
  24. </ul></div>
  25. </header>
  26. <article>
  27. <div class="container-overview">
  28. <h2>Constructor</h2>
  29. <h3 class="name name-method" id="UniformGroupNode" translate="no">new <a href="#UniformGroupNode">UniformGroupNode</a><span class="signature">( name : <span class="param-type">string</span>, shared : <span class="param-type">boolean</span>, order : <span class="param-type">number</span>, updateType : <span class="param-type">string | null</span> )</span> </h3>
  30. <div class="method">
  31. <div class="description">
  32. <p>Constructs a new uniform group node.</p>
  33. </div>
  34. <table class="params">
  35. <tbody>
  36. <tr>
  37. <td class="name">
  38. <strong translate="no">name</strong>
  39. </td>
  40. <td class="description last">
  41. <p>The name of the uniform group node.</p>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td class="name">
  46. <strong translate="no">shared</strong>
  47. </td>
  48. <td class="description last">
  49. <p>Whether this uniform group node is shared or not.</p>
  50. <p>Default is <code>false</code>.</p>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td class="name">
  55. <strong translate="no">order</strong>
  56. </td>
  57. <td class="description last">
  58. <p>Influences the internal sorting.</p>
  59. <p>Default is <code>1</code>.</p>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="name">
  64. <strong translate="no">updateType</strong>
  65. </td>
  66. <td class="description last">
  67. <p>The update type of the uniform group node.</p>
  68. <p>Default is <code>null</code>.</p>
  69. </td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. </div>
  74. </div>
  75. <h2 class="subsection-title">Properties</h2>
  76. <div class="member">
  77. <h3 class="name" id="isUniformGroup" translate="no">.<a href="#isUniformGroup">isUniformGroup</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  78. <div class="description">
  79. <p>This flag can be used for type testing.</p>
  80. <p>Default is <code>true</code>.</p>
  81. </div>
  82. </div>
  83. <div class="member">
  84. <h3 class="name" id="name" translate="no">.<a href="#name">name</a><span class="type-signature"> : string</span> </h3>
  85. <div class="description">
  86. <p>The name of the uniform group node.</p>
  87. </div>
  88. <dl class="details">
  89. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#name">Node#name</a></dt>
  90. </dl>
  91. </div>
  92. <div class="member">
  93. <h3 class="name" id="order" translate="no">.<a href="#order">order</a><span class="type-signature"> : number</span> </h3>
  94. <div class="description">
  95. <p>Influences the internal sorting.
  96. TODO: Add details when this property should be changed.</p>
  97. <p>Default is <code>1</code>.</p>
  98. </div>
  99. </div>
  100. <div class="member">
  101. <h3 class="name" id="shared" translate="no">.<a href="#shared">shared</a><span class="type-signature"> : boolean</span> </h3>
  102. <div class="description">
  103. <p>Whether this uniform group node is shared or not.</p>
  104. <p>Default is <code>false</code>.</p>
  105. </div>
  106. </div>
  107. <div class="member">
  108. <h3 class="name" id="updateType" translate="no">.<a href="#updateType">updateType</a><span class="type-signature"> : string | null</span> </h3>
  109. <div class="description">
  110. <p>The update type of the uniform group node.</p>
  111. <p>Default is <code>null</code>.</p>
  112. </div>
  113. <dl class="details">
  114. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#updateType">Node#updateType</a></dt>
  115. </dl>
  116. </div>
  117. <h2 class="subsection-title">Methods</h2>
  118. <h3 class="name name-method" id="deserialize" translate="no">.<a href="#deserialize">deserialize</a><span class="signature">( data : <span class="param-type">Object</span> )</span> </h3>
  119. <div class="method">
  120. <div class="description">
  121. <p>Deserializes the uniform group node from a JSON object.</p>
  122. </div>
  123. <table class="params">
  124. <tbody>
  125. <tr>
  126. <td class="name">
  127. <strong translate="no">data</strong>
  128. </td>
  129. <td class="description last">
  130. <p>The object containing the serialized data.</p>
  131. </td>
  132. </tr>
  133. </tbody>
  134. </table>
  135. <dl class="details">
  136. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#deserialize">Node#deserialize</a></dt>
  137. </dl>
  138. </div>
  139. <h3 class="name name-method" id="serialize" translate="no">.<a href="#serialize">serialize</a><span class="signature">( data : <span class="param-type">Object</span> )</span> </h3>
  140. <div class="method">
  141. <div class="description">
  142. <p>Serializes the uniform group node to a JSON object.</p>
  143. </div>
  144. <table class="params">
  145. <tbody>
  146. <tr>
  147. <td class="name">
  148. <strong translate="no">data</strong>
  149. </td>
  150. <td class="description last">
  151. <p>The object to store the serialized data.</p>
  152. </td>
  153. </tr>
  154. </tbody>
  155. </table>
  156. <dl class="details">
  157. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#serialize">Node#serialize</a></dt>
  158. </dl>
  159. </div>
  160. <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">()</span> </h3>
  161. <div class="method">
  162. <div class="description">
  163. <p>Marks the uniform group node as needing an update.
  164. This will trigger the necessary updates in the rendering process.</p>
  165. </div>
  166. <dl class="details">
  167. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#update">Node#update</a></dt>
  168. </dl>
  169. </div>
  170. <h2 class="subsection-title">Source</h2>
  171. <p>
  172. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/UniformGroupNode.js" translate="no" target="_blank" rel="noopener">src/nodes/core/UniformGroupNode.js</a>
  173. </p>
  174. </article>
  175. </section>
  176. <script src="../scripts/linenumber.js"></script>
  177. <script src="../scripts/page.js"></script>
  178. </body>
  179. </html>
粤ICP备19079148号