const logo = document.querySelector("#union svg");
const t = gsap.to(logo, {
rotation: -360,
duration: 5,
ease: "none",
repeat: -1
});
t.iteration(1000);
const speedFactor = 1;
let tl;
var rotate = gsap.timeline({
scrollTrigger: {
trigger: "html",
start: "top top",
end: "+=10000",
onUpdate: (self) => {
tl && tl.kill();
tl = gsap
.timeline()
.to(t, { timeScale: speedFactor * self.direction, duration: 0.1 })
.to(t, { timeScale: self.direction, duration: 1 }, "+=0.5");
}
}
});
const logo = document.querySelector("#union svg");
const t = gsap.to(logo, {
rotation: -360,
duration: 5,
ease: "none",
repeat: -1
});
t.iteration(1000);
const speedFactor = 1;
let tl;
var rotate = gsap.timeline({
scrollTrigger: {
trigger: "html",
start: "top top",
end: "+=10000",
onUpdate: (self) => {
tl && tl.kill();
tl = gsap
.timeline()
.to(t, { timeScale: speedFactor * self.direction, duration: 0.1 })
.to(t, { timeScale: self.direction, duration: 1 }, "+=0.5");
}
}
});