Actually I was able to solve it! Replace those 2 functions in my last codepen with these and it works. Apparently the way it uses rotation property is bit different but I think I got hang of it.
const pieClockWiseAnim = () => {
const tl = gsap.timeline();
tl.from(".clockwise_anim", {
opacity: 0,
rotation: -pieRotateMax,
scale: 0,
});
tl.to(".clockwise_anim", {
opacity: 0,
rotation: pieRotateMax,
scale: 5,
duration: 1,
});
return tl;
};
const pieAntiClockWiseAnim = () => {
const tl = gsap.timeline();
tl.from(".anticlockwise_anim", {
opacity: 0,
rotation: pieRotateMax,
scale: 0,
});
tl.to(".anticlockwise_anim", {
opacity: 0,
rotation: -pieRotateMax,
scale: 5,
duration: 1,
});
return tl;
};