Essentially I have an intro pin effect for a page that should only start at the beginning in certain scenarios like accessing the homepage directly. On route changes to the homepage I want the user to see the page after the pin effect but still have the option to scroll up. Below is a rough example, and it kind of works insofar when navigating to the page it'll go to scroll pos 2000. But you see a flash of the scrub animation which I don't want.
Not sure if this can be achieved.
if(fromRouteChange){
window.scrollTo(0, 2000);
}
tl.current = gsap.timeline({
scrollTrigger: {
trigger: ContainerRef,
id: "hello",
start: "top top",
end: "+=2000",
pin: true,
scrub: 0.9,
}
})