<script>
var path = anime.path('.spiral svg path');
anime({
targets: '.ball',
translateX: path('x'),
translateY: path('y'),
rotate: path('angle'),
easing: 'cubicBezier(0.5, 0, 1, 1)',
delay: anime.stagger(5000),
duration: 60000,
loop: true
});
anime({
targets: '.spiral',
scaleY: 0.8,
easing: 'spring(25, 80, 5, 0)',
duration: 4500,
loop: true,
});
</script>
<style>
.spiral {
transform-origin: 0% 0% 0;
}
</style>