Conversation
|
Although this simplifies it a lot by just hooking to rAF again - I can't move forward with this. The changes you are proposing basically add additional rAF calls for Also when you measure FPS - how are you measuring, device / compositing output or browser reported FPS? |
|
Understood - I've just pushed up some tweaks. The Renderer reports back an FPS that is significantly less than the targetFPS variable. I've updated the timing with the setTimeout so that it calls the rAF hopefully "before" the next frame. What is happening is the setTimeout is causing the rAF to be called on the following frame. I've also changed the 16.66666 to 15 so the next rAF will be called rather than missing a frame. |
5d7b100 to
48f5fb5
Compare
Setting targetFPS to 30 resulted in only getting ~20 fps. Due to improper logic with setTimeout & raf delay.