mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Moved the raf after the callback.
This commit is contained in:
parent
960acce62c
commit
1eda6229be
1 changed files with 4 additions and 4 deletions
|
@ -42,9 +42,9 @@ var RequestAnimationFrame = function ()
|
|||
{
|
||||
_this.tick = timestamp;
|
||||
|
||||
_this.timeOutID = window.requestAnimationFrame(step);
|
||||
|
||||
_this.callback(timestamp);
|
||||
|
||||
_this.timeOutID = window.requestAnimationFrame(step);
|
||||
};
|
||||
|
||||
var stepTimeout = function ()
|
||||
|
@ -53,9 +53,9 @@ var RequestAnimationFrame = function ()
|
|||
|
||||
_this.tick = d;
|
||||
|
||||
_this.timeOutID = window.setTimeout(stepTimeout, _this.timeToCall);
|
||||
|
||||
_this.callback(d);
|
||||
|
||||
_this.timeOutID = window.setTimeout(stepTimeout, _this.timeToCall);
|
||||
};
|
||||
|
||||
this.step = step;
|
||||
|
|
Loading…
Reference in a new issue