<p dir="auto"><strong>Describe the bug</strong></p>
<p dir="auto">When calling <code class="notranslate">clock.getDelta()</code> <em>after</em> <code class="notranslate">clock.getElapsedTime()</code>, the returned value is not the delta between successive calls to <code class="notranslate">clock.getDelta()</code>.</p>
<p dir="auto"><em><strong>Live example</strong></em></p>
<p dir="auto"><a href="https://codesandbox.io/s/three-frame-delta-ev4d9" rel="nofollow">https://codesandbox.io/s/three-frame-delta-ev4d9</a></p>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">Sometimes I want to animate certain objects based on the elapsed time and others based on time deltas. I expect to be able to call <code class="notranslate">clock.getDelta()</code> once per frame and have the result represent the time between frames. However, given the implementation of <code class="notranslate">clock.getElapsedTime()</code>, this is not the case if you are also calling <code class="notranslate">clock.getElapsedTime</code> in the same loop.</p>
<p dir="auto">If you read closely, <a href="https://threejs.org/docs/#api/en/core/Clock.getDelta" rel="nofollow">the docs</a> do correctly describe this behavior ("Get the seconds passed since the time oldTime was set"), but IMO it is not the expected behavior.</p>
<p dir="auto">Or perhaps this is more of an enhancement request: could there be a separate function like <code class="notranslate">clock.getFrameDelta()</code> that is independent of <code class="notranslate">clock.getElapsedTime()</code>? Or is the suggested workaround to use multiple clocks here?</p>
<p dir="auto"><strong>Platform:</strong></p>
<ul dir="auto">
<li>Three.js version: r128</li>
</ul>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/220033/12996799/0798051a-d0e8-11e5-8eb4-15c22988ed0c.png"><img src="https://cloud.githubusercontent.com/assets/220033/12996799/0798051a-d0e8-11e5-8eb4-15c22988ed0c.png" alt="screen shot 2016-02-11 at 5 46 00 pm" style="max-width: 100%;"></a></p>
<p dir="auto"><a href="https://dl.dropboxusercontent.com/u/1595444/shaka-player/stream-texture.html" rel="nofollow">https://dl.dropboxusercontent.com/u/1595444/shaka-player/stream-texture.html</a><br>
(on Chrome clicking play on the video element shows an upside down render of the video on the canvas element. In Safari/Firefox <code class="notranslate">texImage2D</code> is real upset)</p>