animation loop reset

wrapped with a settimeout