properly hook requestAnimFrame for syncing redraw with browser