throttle resize using requestAnimationFrame