Can we consider replacing setInterval(function() {
obj.redraw();
}, 1000 / fps);
with something similar to requestAnimFrame where setTimeout would be called at the end of obj.redraw? Right now if I render something heavy that takes more that 1000 / fps milliseconds the app becomes so unresponsive that is even hard to close it.
Can we consider replacing setInterval(function() {
obj.redraw();
}, 1000 / fps);
with something similar to requestAnimFrame where setTimeout would be called at the end of obj.redraw? Right now if I render something heavy that takes more that 1000 / fps milliseconds the app becomes so unresponsive that is even hard to close it.