Closed melonjs closed 11 years ago
Well, it's not the clearTimeout that will fix the problem with performance, but the actual time passed to setTimeout. I agree it will prevent multiple defers from executing per frame. But for performance you want the delay to be longer than a single frame.
I'm ok to spend more time on this, but do you really believe it's that critical ?
So I did that for now (easy & cheap solution). I will give it more attention tonight once back at home, and will try this with my old mbp and several browsers (to see If there is a perfromance issue we should worry about)
@obiot: Nope, not at all critical! Just an observation. ;)
Implement graphics auto-resize in melonJS, and use the browser resize event, to create (full)screen size independent games.