From 8234d6ac1fee7a93693018f8df51d2f4eae60419 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Mon, 31 Jul 2017 17:05:47 +0100 Subject: [PATCH] Fixed Nan TimeStep errors. --- v3/src/boot/TimeStep.js | 10 ++++------ v3/src/checksum.js | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/v3/src/boot/TimeStep.js b/v3/src/boot/TimeStep.js index e1ac697ed..9c3110f9c 100644 --- a/v3/src/boot/TimeStep.js +++ b/v3/src/boot/TimeStep.js @@ -69,11 +69,6 @@ var TimeStep = new Class({ // The actual elapsed time in ms between one update and the next. // No smoothing, no capping, no averaging. So please be aware of this when using the contents of this property. this.rawDelta = 0; - - for (var i = 0; i < this.deltaSmoothingMax; i++) - { - this.deltaHistory[i] = this._target; - } }, // Called when the DOM window.onBlur event triggers @@ -145,7 +140,10 @@ var TimeStep = new Class({ this.started = true; this.running = true; - this.deltaHistory = []; + for (var i = 0; i < this.deltaSmoothingMax; i++) + { + this.deltaHistory[i] = this._target; + } this.resetDelta(); diff --git a/v3/src/checksum.js b/v3/src/checksum.js index ac02d45bf..5cd76f862 100644 --- a/v3/src/checksum.js +++ b/v3/src/checksum.js @@ -1,4 +1,4 @@ var CHECKSUM = { -build: '25109a70-75f2-11e7-834a-a16fc1dcb07f' +build: 'fe206a90-7609-11e7-b1ce-db003560483b' }; module.exports = CHECKSUM; \ No newline at end of file