It is possible to set a "mixin" to animation like this:
const example = () => {
return (
{ fill: "609E78", duration: 1.58 },
{ fill: "E69D00", duration: 0.41 },
{ fill: "609E78", duration: 0.09 },
{ fill: "609E78", duration: 0.5 },
{ fill: "E69D00", duration: 0.41 },
{ fill: "609E78", duration: 0.09 },
{ fill: "609E78", duration: 6.91 },
)
}
function implementationAnimation() {
gsap.to([dot1_CODE], {
keyframes: [
{ fill: "609E78", opacity: 1, duration: 0.01, delay: 2 },
example()
],
repeat: -1,
});
I want to use "example" in some other place