raf based gameloop