Constructor for AnimationObject