NodeFrame.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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.<br/>Default is <code>null</code>.</p>
  35. </div>
  36. </div>
  37. <div class="member">
  38. <h3 class="name" id="deltaTime" translate="no">.<a href="#deltaTime">deltaTime</a><span class="type-signature"> : number</span> </h3>
  39. <div class="description">
  40. <p>The delta time in seconds.<br/>Default is <code>0</code>.</p>
  41. </div>
  42. </div>
  43. <div class="member">
  44. <h3 class="name" id="frameId" translate="no">.<a href="#frameId">frameId</a><span class="type-signature"> : number</span> </h3>
  45. <div class="description">
  46. <p>The frame ID.<br/>Default is <code>0</code>.</p>
  47. </div>
  48. </div>
  49. <div class="member">
  50. <h3 class="name" id="material" translate="no">.<a href="#material">material</a><span class="type-signature"> : <a href="Material.html">Material</a></span> </h3>
  51. <div class="description">
  52. <p>A reference to the current material.<br/>Default is <code>null</code>.</p>
  53. </div>
  54. </div>
  55. <div class="member">
  56. <h3 class="name" id="object" translate="no">.<a href="#object">object</a><span class="type-signature"> : <a href="Object3D.html">Object3D</a></span> </h3>
  57. <div class="description">
  58. <p>A reference to the current 3D object.<br/>Default is <code>null</code>.</p>
  59. </div>
  60. </div>
  61. <div class="member">
  62. <h3 class="name" id="renderId" translate="no">.<a href="#renderId">renderId</a><span class="type-signature"> : number</span> </h3>
  63. <div class="description">
  64. <p>The render ID.<br/>Default is <code>0</code>.</p>
  65. </div>
  66. </div>
  67. <div class="member">
  68. <h3 class="name" id="renderer" translate="no">.<a href="#renderer">renderer</a><span class="type-signature"> : <a href="Renderer.html">Renderer</a></span> </h3>
  69. <div class="description">
  70. <p>A reference to the current renderer.<br/>Default is <code>null</code>.</p>
  71. </div>
  72. </div>
  73. <div class="member">
  74. <h3 class="name" id="scene" translate="no">.<a href="#scene">scene</a><span class="type-signature"> : <a href="Scene.html">Scene</a></span> </h3>
  75. <div class="description">
  76. <p>A reference to the current scene.<br/>Default is <code>null</code>.</p>
  77. </div>
  78. </div>
  79. <div class="member">
  80. <h3 class="name" id="time" translate="no">.<a href="#time">time</a><span class="type-signature"> : number</span> </h3>
  81. <div class="description">
  82. <p>The elapsed time in seconds.<br/>Default is <code>0</code>.</p>
  83. </div>
  84. </div>
  85. <div class="member">
  86. <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>
  87. <div class="description">
  88. <p>Used to control the <a href="Node.html#updateAfter">Node#updateAfter</a> call.</p>
  89. </div>
  90. </div>
  91. <div class="member">
  92. <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>
  93. <div class="description">
  94. <p>Used to control the <a href="Node.html#updateBefore">Node#updateBefore</a> call.</p>
  95. </div>
  96. </div>
  97. <div class="member">
  98. <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>
  99. <div class="description">
  100. <p>Used to control the <a href="Node.html#update">Node#update</a> call.</p>
  101. </div>
  102. </div>
  103. <h2 class="subsection-title">Methods</h2>
  104. <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">()</span> </h3>
  105. <div class="method">
  106. <div class="description">
  107. <p>Updates the internal state of the node frame. This method is
  108. called by the renderer in its internal animation loop.</p>
  109. </div>
  110. </div>
  111. <h3 class="name name-method" id="updateAfterNode" translate="no">.<a href="#updateAfterNode">updateAfterNode</a><span class="signature">( node : <span class="param-type">Node</span> )</span> </h3>
  112. <div class="method">
  113. <div class="description">
  114. <p>This method executes the <a href="Node.html#updateAfter">Node#updateAfter</a> for the given node.
  115. It makes sure <a href="Node.html#updateAfterType">Node#updateAfterType</a> is honored meaning the update
  116. is only executed once per frame, render or object depending on the update
  117. type.</p>
  118. </div>
  119. <table class="params">
  120. <tbody>
  121. <tr>
  122. <td class="name"><code>node</code></td>
  123. <td class="description last"><p>The node that should be updated.</p></td>
  124. </tr>
  125. </tbody>
  126. </table>
  127. </div>
  128. <h3 class="name name-method" id="updateBeforeNode" translate="no">.<a href="#updateBeforeNode">updateBeforeNode</a><span class="signature">( node : <span class="param-type">Node</span> )</span> </h3>
  129. <div class="method">
  130. <div class="description">
  131. <p>This method executes the <a href="Node.html#updateBefore">Node#updateBefore</a> for the given node.
  132. It makes sure <a href="Node.html#updateBeforeType">Node#updateBeforeType</a> is honored meaning the update
  133. is only executed once per frame, render or object depending on the update
  134. type.</p>
  135. </div>
  136. <table class="params">
  137. <tbody>
  138. <tr>
  139. <td class="name"><code>node</code></td>
  140. <td class="description last"><p>The node that should be updated.</p></td>
  141. </tr>
  142. </tbody>
  143. </table>
  144. </div>
  145. <h3 class="name name-method" id="updateNode" translate="no">.<a href="#updateNode">updateNode</a><span class="signature">( node : <span class="param-type">Node</span> )</span> </h3>
  146. <div class="method">
  147. <div class="description">
  148. <p>This method executes the <a href="Node.html#update">Node#update</a> for the given node.
  149. It makes sure <a href="Node.html#updateType">Node#updateType</a> is honored meaning the update
  150. is only executed once per frame, render or object depending on the update
  151. type.</p>
  152. </div>
  153. <table class="params">
  154. <tbody>
  155. <tr>
  156. <td class="name"><code>node</code></td>
  157. <td class="description last"><p>The node that should be updated.</p></td>
  158. </tr>
  159. </tbody>
  160. </table>
  161. </div>
  162. <h2 class="subsection-title">Source</h2>
  163. <p>
  164. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/NodeFrame.js" target="_blank" rel="noopener" translate="no">src/nodes/core/NodeFrame.js</a>
  165. </p>
  166. </article>
  167. </section>
  168. <script src="../scripts/linenumber.js"></script>
  169. <script src="../scripts/page.js"></script>
  170. </body>
  171. </html>
粤ICP备19079148号