change resolution & implement requestAnimationFrame