TimestampQueryPool.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>TimestampQueryPool - 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">TimestampQueryPool</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>Abstract base class of a timestamp query pool.</p></div>
  16. </header>
  17. <article>
  18. <div class="container-overview">
  19. <h2>Constructor</h2>
  20. <h3 class="name name-method" id="TimestampQueryPool" translate="no">new <a href="#TimestampQueryPool">TimestampQueryPool</a><span class="signature">( maxQueries : <span class="param-type">number</span> )</span> <span class="type-signature">(abstract) </span></h3>
  21. <div class="method">
  22. <div class="description">
  23. <p>Creates a new timestamp query pool.</p>
  24. </div>
  25. <table class="params">
  26. <tbody>
  27. <tr>
  28. <td class="name">
  29. <strong>maxQueries</strong>
  30. </td>
  31. <td class="description last">
  32. <p>Maximum number of queries this pool can hold.</p>
  33. <p>Default is <code>256</code>.</p>
  34. </td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. </div>
  40. <h2 class="subsection-title">Properties</h2>
  41. <div class="member">
  42. <h3 class="name" id="currentQueryIndex" translate="no">.<a href="#currentQueryIndex">currentQueryIndex</a><span class="type-signature"> : number</span> </h3>
  43. <div class="description">
  44. <p>How many queries allocated so far.</p>
  45. <p>Default is <code>0</code>.</p>
  46. </div>
  47. </div>
  48. <div class="member">
  49. <h3 class="name" id="frames" translate="no">.<a href="#frames">frames</a><span class="type-signature"> : Array.&lt;number></span> </h3>
  50. <div class="description">
  51. <p>Stores all timestamp frames.</p>
  52. </div>
  53. </div>
  54. <div class="member">
  55. <h3 class="name" id="isDisposed" translate="no">.<a href="#isDisposed">isDisposed</a><span class="type-signature"> : boolean</span> </h3>
  56. <div class="description">
  57. <p>Whether the pool has been disposed or not.</p>
  58. <p>Default is <code>false</code>.</p>
  59. </div>
  60. </div>
  61. <div class="member">
  62. <h3 class="name" id="lastValue" translate="no">.<a href="#lastValue">lastValue</a><span class="type-signature"> : number</span> </h3>
  63. <div class="description">
  64. <p>TODO</p>
  65. <p>Default is <code>0</code>.</p>
  66. </div>
  67. </div>
  68. <div class="member">
  69. <h3 class="name" id="maxQueries" translate="no">.<a href="#maxQueries">maxQueries</a><span class="type-signature"> : number</span> </h3>
  70. <div class="description">
  71. <p>Maximum number of queries this pool can hold.</p>
  72. <p>Default is <code>256</code>.</p>
  73. </div>
  74. </div>
  75. <div class="member">
  76. <h3 class="name" id="pendingResolve" translate="no">.<a href="#pendingResolve">pendingResolve</a><span class="type-signature"> : boolean</span> </h3>
  77. <div class="description">
  78. <p>TODO</p>
  79. <p>Default is <code>false</code>.</p>
  80. </div>
  81. </div>
  82. <div class="member">
  83. <h3 class="name" id="queryOffsets" translate="no">.<a href="#queryOffsets">queryOffsets</a><span class="type-signature"> : Map.&lt;string, number></span> </h3>
  84. <div class="description">
  85. <p>Tracks offsets for different contexts.</p>
  86. </div>
  87. </div>
  88. <div class="member">
  89. <h3 class="name" id="timestamps" translate="no">.<a href="#timestamps">timestamps</a><span class="type-signature"> : Map.&lt;string, number></span> </h3>
  90. <div class="description">
  91. <p>Stores the latest timestamp for each render context.</p>
  92. </div>
  93. </div>
  94. <div class="member">
  95. <h3 class="name" id="trackTimestamp" translate="no">.<a href="#trackTimestamp">trackTimestamp</a><span class="type-signature"> : boolean</span> </h3>
  96. <div class="description">
  97. <p>Whether to track timestamps or not.</p>
  98. <p>Default is <code>true</code>.</p>
  99. </div>
  100. </div>
  101. <h2 class="subsection-title">Methods</h2>
  102. <h3 class="name name-method" id="allocateQueriesForContext" translate="no">.<a href="#allocateQueriesForContext">allocateQueriesForContext</a><span class="signature">( uid : <span class="param-type">string</span>, frameId : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> <span class="type-signature">(abstract) </span></h3>
  103. <div class="method">
  104. <div class="description">
  105. <p>Allocate queries for a specific uid.</p>
  106. </div>
  107. <table class="params">
  108. <tbody>
  109. <tr>
  110. <td class="name">
  111. <strong>uid</strong>
  112. </td>
  113. <td class="description last">
  114. <p>A unique identifier for the render context.</p>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td class="name">
  119. <strong>frameId</strong>
  120. </td>
  121. <td class="description last">
  122. <p>The current frame identifier.</p>
  123. </td>
  124. </tr>
  125. </tbody>
  126. </table>
  127. </div>
  128. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> <span class="type-signature">(abstract) </span></h3>
  129. <div class="method">
  130. <div class="description">
  131. <p>Dispose of the query pool.</p>
  132. </div>
  133. </div>
  134. <h3 class="name name-method" id="getTimestamp" translate="no">.<a href="#getTimestamp">getTimestamp</a><span class="signature">( uid : <span class="param-type">string</span> )</span><span class="type-signature"> : number</span> </h3>
  135. <div class="method">
  136. <div class="description">
  137. <p>Returns the timestamp for a given render context.</p>
  138. </div>
  139. <table class="params">
  140. <tbody>
  141. <tr>
  142. <td class="name">
  143. <strong>uid</strong>
  144. </td>
  145. <td class="description last">
  146. <p>A unique identifier for the render context.</p>
  147. </td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. <dl class="details">
  152. <dt class="tag-returns"><strong>Returns:</strong> The timestamp, or undefined if not available.</dt>
  153. </dl>
  154. </div>
  155. <h3 class="name name-method" id="getTimestampFrames" translate="no">.<a href="#getTimestampFrames">getTimestampFrames</a><span class="signature">()</span><span class="type-signature"> : Array.&lt;number></span> </h3>
  156. <div class="method">
  157. <div class="description">
  158. <p>Returns all timestamp frames.</p>
  159. </div>
  160. <dl class="details">
  161. <dt class="tag-returns"><strong>Returns:</strong> The timestamp frames.</dt>
  162. </dl>
  163. </div>
  164. <h3 class="name name-method" id="hasTimestamp" translate="no">.<a href="#hasTimestamp">hasTimestamp</a><span class="signature">( uid : <span class="param-type">string</span> )</span><span class="type-signature"> : boolean</span> </h3>
  165. <div class="method">
  166. <div class="description">
  167. <p>Returns whether a timestamp is available for a given render context.</p>
  168. </div>
  169. <table class="params">
  170. <tbody>
  171. <tr>
  172. <td class="name">
  173. <strong>uid</strong>
  174. </td>
  175. <td class="description last">
  176. <p>A unique identifier for the render context.</p>
  177. </td>
  178. </tr>
  179. </tbody>
  180. </table>
  181. <dl class="details">
  182. <dt class="tag-returns"><strong>Returns:</strong> True if a timestamp is available, false otherwise.</dt>
  183. </dl>
  184. </div>
  185. <h3 class="name name-method" id="resolveQueriesAsync" translate="no">.<a href="#resolveQueriesAsync">resolveQueriesAsync</a><span class="signature">()</span><span class="type-signature"> : Promise.&lt;number> | number</span> <span class="type-signature">(async, abstract) </span></h3>
  186. <div class="method">
  187. <div class="description">
  188. <p>Resolve all timestamps and return data (or process them).</p>
  189. </div>
  190. <dl class="details">
  191. <dt class="tag-returns"><strong>Returns:</strong> The resolved timestamp value.</dt>
  192. </dl>
  193. </div>
  194. <h2 class="subsection-title">Source</h2>
  195. <p>
  196. <a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/common/TimestampQueryPool.js" translate="no" target="_blank" rel="noopener">src/renderers/common/TimestampQueryPool.js</a>
  197. </p>
  198. </article>
  199. </section>
  200. <script src="../scripts/linenumber.js"></script>
  201. <script src="../scripts/page.js"></script>
  202. </body>
  203. </html>
粤ICP备19079148号