We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c78abf commit 559d1cdCopy full SHA for 559d1cd
src/nodes/core/NodeFrame.js
@@ -291,16 +291,22 @@ class NodeFrame {
291
292
this.frameId ++;
293
294
- if ( this.lastTime === undefined ) this.lastTime = performance.now();
+ if ( this.lastTime === undefined ) this.lastTime = now();
295
296
- this.deltaTime = ( performance.now() - this.lastTime ) / 1000;
+ this.deltaTime = ( now() - this.lastTime ) / 1000;
297
298
- this.lastTime = performance.now();
+ this.lastTime = now();
299
300
this.time += this.deltaTime;
301
302
}
303
304
305
306
+function now() {
307
+
308
+ return performance.now();
309
310
+}
311
312
export default NodeFrame;
0 commit comments