I was trying to change how long a tween runs for in a timeline in between the repeats of itself. I couldn't figure out how to, and ended up just breaking it up into separate tweens. Is there a way that I am missing?
pointerTimeline.to(".pointer", { //Bounces back and forth
duration: time/ (2 * pointerTimeline.repeat()),
rotation: "-=" + pointerMaxDegree,
ease: "linear",
yoyo: true,
repeat: 3,
});
^ Me playing around with the repeat
This is what I ended up doing.
pointerTimeline.to(".pointer", {
duration: time/ (6),
rotation: "-=" + 170,
ease: "linear",
});
pointerTimeline.to(".pointer", {
duration: time/ (5),
rotation: "+=" + 170,
ease: "linear",
});
pointerTimeline.to(".pointer", {
duration: time/ (4),
rotation: "-=" + 170,
ease: "linear",
});
pointerTimeline.to(".pointer", {
duration: time/ (3),
rotation: "+=" + 170,
ease: "linear",
});