Issue#148:JSError when deleting first frame + preview speed accuracy

This commit is contained in:
jdescottes
2013-12-19 00:15:40 +01:00
parent 4056142b97
commit f98c2d2cf5
2 changed files with 2 additions and 6 deletions

View File

@ -6,7 +6,6 @@
this.isRunning = false;
this.previousTime = 0;
this.callbacks = [];
this.i = 0;
};
ns.DrawingLoop.prototype.addCallback = function (callback, scope, args) {
@ -34,10 +33,7 @@
ns.DrawingLoop.prototype.loop_ = function () {
var currentTime = Date.now();
var delta = currentTime - this.previousTime;
this.i++;
if(this.i%2 === 0) {
this.executeCallbacks_(delta);
}
this.executeCallbacks_(delta);
this.previousTime = currentTime;
this.requestAnimationFrame.call(window, this.loop_.bind(this));
};