This problem was found in Apple users devices, but we want to extend it to all devices
// if enough time has elapsed, draw the next frame
if (GAME_.fpsCtrl.elapsed > GAME_.fpsCtrl.fpsInterval) {
// Measure fps
GAME_.fpsCtrl.mFps = Math.round(1000 / GAME_.fpsCtrl.elapsed);
if (GAME_.fpsCtrl.mFps < GAME_.fpsCtrl.fps/2) {
console.log('Lagggggggggggggggg');
}
// Get ready for next frame by setting then = now
GAME_.fpsCtrl.then = GAME_.fpsCtrl.now - (GAME_.fpsCtrl.elapsed % GAME_.fpsCtrl.fpsInterval);
// SAFE TO DRAW
draw();
}
This problem was found in Apple users devices, but we want to extend it to all devices