Changed JS for animation effect

Added the automatic rendering button for the animation.