Passes in the animation data into the constructor