check loop condition before render
This commit is contained in:
parent
f002f3d9d4
commit
8a8455922d
@ -115,7 +115,6 @@ var cancelAnimationFrame = global.cancelAnimationFrame
|
||||
delta = Math.min(this.options.maxDelta, delta);
|
||||
this._t0 = t1;
|
||||
this._time += delta;
|
||||
this.time(this._time);
|
||||
if(this.step() >= this.options.steps) {
|
||||
this._time = 0;
|
||||
if(!this.options.loop){
|
||||
@ -123,6 +122,7 @@ var cancelAnimationFrame = global.cancelAnimationFrame
|
||||
}
|
||||
}
|
||||
if(this.running) {
|
||||
this.time(this._time);
|
||||
requestAnimationFrame(this._tick);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user