Don't loop as hell when FPS is zero
This commit is contained in:
parent
9b3b501764
commit
153f7341fe
@ -246,9 +246,13 @@ Torque.modules.layer = function (torque) {
|
|||||||
this.options.scrub_move(this)
|
this.options.scrub_move(this)
|
||||||
}
|
}
|
||||||
if (this.running) {
|
if (this.running) {
|
||||||
setTimeout(function () {
|
if ( this.options.fps ) {
|
||||||
this.play()
|
var ms = pause + 1000 * 1 / this.options.fps;
|
||||||
}.bind(this), pause + 1000 * 1 / this.options.fps);
|
//console.log("play timeout: " + ms + " ms (pause:" + pause + ", fps:" + this.options.fps + ")");
|
||||||
|
setTimeout(function () {
|
||||||
|
this.play()
|
||||||
|
}.bind(this), ms);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -376,4 +380,4 @@ function meterToPixels(mx, my, zoom) {
|
|||||||
var px = (mx + originShift) / res;
|
var px = (mx + originShift) / res;
|
||||||
var py = (my + originShift) / res;
|
var py = (my + originShift) / res;
|
||||||
return [px, py];
|
return [px, py];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user