Fixed Nan TimeStep errors.

This commit is contained in:
photonstorm 2017-07-31 17:05:47 +01:00
parent fe0b6ea8b0
commit 8234d6ac1f
2 changed files with 5 additions and 7 deletions

View file

@ -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();

View file

@ -1,4 +1,4 @@
var CHECKSUM = {
build: '25109a70-75f2-11e7-834a-a16fc1dcb07f'
build: 'fe206a90-7609-11e7-b1ce-db003560483b'
};
module.exports = CHECKSUM;