| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>TimestampQueryPool - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <h1 translate="no">TimestampQueryPool</h1>
- <section>
- <header>
- <div class="class-description"><p>Abstract base class of a timestamp query pool.</p></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <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>
- <div class="method">
- <div class="description">
- <p>Creates a new timestamp query pool.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>maxQueries</strong>
- </td>
- <td class="description last">
- <p>Maximum number of queries this pool can hold.</p>
- <p>Default is <code>256</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="currentQueryIndex" translate="no">.<a href="#currentQueryIndex">currentQueryIndex</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>How many queries allocated so far.</p>
- <p>Default is <code>0</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="frames" translate="no">.<a href="#frames">frames</a><span class="type-signature"> : Array.<number></span> </h3>
- <div class="description">
- <p>Stores all timestamp frames.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="isDisposed" translate="no">.<a href="#isDisposed">isDisposed</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Whether the pool has been disposed or not.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="lastValue" translate="no">.<a href="#lastValue">lastValue</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>TODO</p>
- <p>Default is <code>0</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="maxQueries" translate="no">.<a href="#maxQueries">maxQueries</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>Maximum number of queries this pool can hold.</p>
- <p>Default is <code>256</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="pendingResolve" translate="no">.<a href="#pendingResolve">pendingResolve</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>TODO</p>
- <p>Default is <code>false</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="queryOffsets" translate="no">.<a href="#queryOffsets">queryOffsets</a><span class="type-signature"> : Map.<string, number></span> </h3>
- <div class="description">
- <p>Tracks offsets for different contexts.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="timestamps" translate="no">.<a href="#timestamps">timestamps</a><span class="type-signature"> : Map.<string, number></span> </h3>
- <div class="description">
- <p>Stores the latest timestamp for each render context.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="trackTimestamp" translate="no">.<a href="#trackTimestamp">trackTimestamp</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Whether to track timestamps or not.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <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>
- <div class="method">
- <div class="description">
- <p>Allocate queries for a specific uid.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>uid</strong>
- </td>
- <td class="description last">
- <p>A unique identifier for the render context.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>frameId</strong>
- </td>
- <td class="description last">
- <p>The current frame identifier.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <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>
- <div class="method">
- <div class="description">
- <p>Dispose of the query pool.</p>
- </div>
- </div>
- <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>
- <div class="method">
- <div class="description">
- <p>Returns the timestamp for a given render context.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>uid</strong>
- </td>
- <td class="description last">
- <p>A unique identifier for the render context.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The timestamp, or undefined if not available.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id="getTimestampFrames" translate="no">.<a href="#getTimestampFrames">getTimestampFrames</a><span class="signature">()</span><span class="type-signature"> : Array.<number></span> </h3>
- <div class="method">
- <div class="description">
- <p>Returns all timestamp frames.</p>
- </div>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The timestamp frames.</dt>
- </dl>
- </div>
- <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>
- <div class="method">
- <div class="description">
- <p>Returns whether a timestamp is available for a given render context.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>uid</strong>
- </td>
- <td class="description last">
- <p>A unique identifier for the render context.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> True if a timestamp is available, false otherwise.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id="resolveQueriesAsync" translate="no">.<a href="#resolveQueriesAsync">resolveQueriesAsync</a><span class="signature">()</span><span class="type-signature"> : Promise.<number> | number</span> <span class="type-signature">(async, abstract) </span></h3>
- <div class="method">
- <div class="description">
- <p>Resolve all timestamps and return data (or process them).</p>
- </div>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The resolved timestamp value.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <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>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|