Add better resize-checking and remove polling/requestAnimationFrame