Worked out how to animate the canvas without freezing the ui