NodeFrame.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>NodeFrame - 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. <h1 translate="no">NodeFrame</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>Management class for updating nodes. The module tracks metrics like
  16. the elapsed time, delta time, the render and frame ID to correctly
  17. call the node update methods <a href="Node.html#updateBefore">Node#updateBefore</a>, <a href="Node.html#update">Node#update</a>
  18. and <a href="Node.html#updateAfter">Node#updateAfter</a> depending on the node's configuration.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="NodeFrame" translate="no">new <a href="#NodeFrame">NodeFrame</a><span class="signature">()</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new node fame.</p>
  27. </div>
  28. </div>
  29. </div>
  30. <h2 class="subsection-title">Properties</h2>
  31. <div class="member">
  32. <h3 class="name" id="camera" translate="no">.<a href="#camera">camera</a><span class="type-signature"> : <a href="Camera.html">Camera</a></span> </h3>
  33. <div class="description">
  34. <p>A reference to the current camera.</p>
  35. <p>Default is <code>null</code>.</p>
  36. </div>
  37. </div>
  38. <div class="member">
  39. <h3 class="name" id="deltaTime" translate="no">.<a href="#deltaTime">deltaTime</a><span class="type-signature"> : number</span> </h3>
  40. <div class="description">
  41. <p>The delta time in seconds.</p>
  42. <p>Default is <code>0</code>.</p>
  43. </div>
  44. </div>
  45. <div class="member">
  46. <h3 class="name" id="frameId" translate="no">.<a href="#frameId">frameId</a><span class="type-signature"> : number</span> </h3>
  47. <div class="description">
  48. <p>The frame ID.</p>
  49. <p>Default is <code>0</code>.</p>
  50. </div>
  51. </div>
  52. <div class="member">
  53. <h3 class="name" id="material" translate="no">.<a href="#material">material</a><span class="type-signature"> : <a href="Material.html">Material</a></span> </h3>
  54. <div class="description">
  55. <p>A reference to the current material.</p>
  56. <p>Default is <code>null</code>.</p>
  57. </div>
  58. </div>
  59. <div class="member">
  60. <h3 class="name" id="object" translate="no">.<a href="#object">object</a><span class="type-signature"> : <a href="Object3D.html">Object3D</a></span> </h3>
  61. <div class="description">
  62. <p>A reference to the current 3D object.</p>
  63. <p>Default is <code>null</code>.</p>
  64. </div>
  65. </div>
  66. <div class="member">
  67. <h3 class="name" id="renderId" translate="no">.<a href="#renderId">renderId</a><span class="type-signature"> : number</span> </h3>
  68. <div class="description">
  69. <p>The render ID.</p>
  70. <p>Default is <code>0</code>.</p>
  71. </div>
  72. </div>
  73. <div class="member">
  74. <h3 class="name" id="renderer" translate="no">.<a href="#renderer">renderer</a><span class="type-signature"> : <a href="Renderer.html">Renderer</a></span> </h3>
  75. <div class="description">
  76. <p>A reference to the current renderer.</p>
  77. <p>Default is <code>null</code>.</p>
  78. </div>
  79. </div>
  80. <div class="member">
  81. <h3 class="name" id="scene" translate="no">.<a href="#scene">scene</a><span class="type-signature"> : <a href="Scene.html">Scene</a></span> </h3>
  82. <div class="description">
  83. <p>A reference to the current scene.</p>
  84. <p>Default is <code>null</code>.</p>
  85. </div>
  86. </div>
  87. <div class="member">
  88. <h3 class="name" id="time" translate="no">.<a href="#time">time</a><span class="type-signature"> : number</span> </h3>
  89. <div class="description">
  90. <p>The elapsed time in seconds.</p>
  91. <p>Default is <code>0</code>.</p>
  92. </div>
  93. </div>
  94. <div class="member">
  95. <h3 class="name" id="updateAfterMap" translate="no">.<a href="#updateAfterMap">updateAfterMap</a><span class="type-signature"> : WeakMap.&lt;<a href="Node.html">Node</a>, Object></span> </h3>
  96. <div class="description">
  97. <p>Used to control the <a href="Node.html#updateAfter">Node#updateAfter</a> call.</p>
  98. </div>
  99. </div>
  100. <div class="member">
  101. <h3 class="name" id="updateBeforeMap" translate="no">.<a href="#updateBeforeMap">updateBeforeMap</a><span class="type-signature"> : WeakMap.&lt;<a href="Node.html">Node</a>, Object></span> </h3>
  102. <div class="description">
  103. <p>Used to control the <a href="Node.html#updateBefore">Node#updateBefore</a> call.</p>
  104. </div>
  105. </div>
  106. <div class="member">
  107. <h3 class="name" id="updateMap" translate="no">.<a href="#updateMap">updateMap</a><span class="type-signature"> : WeakMap.&lt;<a href="Node.html">Node</a>, Object></span> </h3>
  108. <div class="description">
  109. <p>Used to control the <a href="Node.html#update">Node#update</a> call.</p>
  110. </div>
  111. </div>
  112. <h2 class="subsection-title">Methods</h2>
  113. <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">()</span> </h3>
  114. <div class="method">
  115. <div class="description">
  116. <p>Updates the internal state of the node frame. This method is
  117. called by the renderer in its internal animation loop.</p>
  118. </div>
  119. </div>
  120. <h3 class="name name-method" id="updateAfterNode" translate="no">.<a href="#updateAfterNode">updateAfterNode</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  121. <div class="method">
  122. <div class="description">
  123. <p>This method executes the <a href="Node.html#updateAfter">Node#updateAfter</a> for the given node.
  124. It makes sure <a href="Node.html#updateAfterType">Node#updateAfterType</a> is honored meaning the update
  125. is only executed once per frame, render or object depending on the update
  126. type.</p>
  127. </div>
  128. <table class="params">
  129. <tbody>
  130. <tr>
  131. <td class="name">
  132. <strong>node</strong>
  133. </td>
  134. <td class="description last">
  135. <p>The node that should be updated.</p>
  136. </td>
  137. </tr>
  138. </tbody>
  139. </table>
  140. </div>
  141. <h3 class="name name-method" id="updateBeforeNode" translate="no">.<a href="#updateBeforeNode">updateBeforeNode</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  142. <div class="method">
  143. <div class="description">
  144. <p>This method executes the <a href="Node.html#updateBefore">Node#updateBefore</a> for the given node.
  145. It makes sure <a href="Node.html#updateBeforeType">Node#updateBeforeType</a> is honored meaning the update
  146. is only executed once per frame, render or object depending on the update
  147. type.</p>
  148. </div>
  149. <table class="params">
  150. <tbody>
  151. <tr>
  152. <td class="name">
  153. <strong>node</strong>
  154. </td>
  155. <td class="description last">
  156. <p>The node that should be updated.</p>
  157. </td>
  158. </tr>
  159. </tbody>
  160. </table>
  161. </div>
  162. <h3 class="name name-method" id="updateNode" translate="no">.<a href="#updateNode">updateNode</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  163. <div class="method">
  164. <div class="description">
  165. <p>This method executes the <a href="Node.html#update">Node#update</a> for the given node.
  166. It makes sure <a href="Node.html#updateType">Node#updateType</a> is honored meaning the update
  167. is only executed once per frame, render or object depending on the update
  168. type.</p>
  169. </div>
  170. <table class="params">
  171. <tbody>
  172. <tr>
  173. <td class="name">
  174. <strong>node</strong>
  175. </td>
  176. <td class="description last">
  177. <p>The node that should be updated.</p>
  178. </td>
  179. </tr>
  180. </tbody>
  181. </table>
  182. </div>
  183. <h2 class="subsection-title">Source</h2>
  184. <p>
  185. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/NodeFrame.js" translate="no" target="_blank" rel="noopener">src/nodes/core/NodeFrame.js</a>
  186. </p>
  187. </article>
  188. </section>
  189. <script src="../scripts/linenumber.js"></script>
  190. <script src="../scripts/page.js"></script>
  191. </body>
  192. </html>
粤ICP备19079148号