Added an animation loop switch.