<div class="box green"></div>
<div class="box purple"></div>
/* Global styles come from external css https://codepen.io/GreenSock/pen/gOWxmWG */
body {
display: flex;
align-items: center;
justify-content: space-around;
min-height: 100vh;
margin: 0;
overflow: hidden;
}
.box {
display: block;
}
gsap.to(".green", {
rotation: 360,
duration: 1,
repeat: 1,
repeatDelay: 1,
});
gsap.to(".purple", {
rotation: 360,
duration: 1,
delay: 1 // delay the start of this animation
});