Jump to content

Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

japgroevemaker's Achievements

  1. Hello everybody, I'm facing a problem with my scrolltrigger. I made an horizontal scroll with scrolltrigger with pin true, but when i navigate to the page with barba my pin breaks. It looks like it is breaking through my pin. When i refresh the page it is working as expected. I don't know how to create an codepen using barba so i hope that i'm clear enough. I'm attaching some images that shows my problem. When i navigate: When i refresh: I've tried to kill al my scrolltriggers and re-init them again, but nothing seems to solve my problem. I hope somebody can help me. function initTimeline() { var main = gsap.timeline({ scrollTrigger: { trigger: container, snap: 1 / (items.length - 1), start: "top top", end: "+=" + (totalWidth / (items.length - 1)).toString(), scrub: 1, pin: true, invalidateOnRefresh: true, } }) } // adding items to timeline main.to(items, { xPercent: -100 * (items.length - 1), ease: "none", }); // Kill scrolltriggers in beforeLeave barba hook barba.hooks.beforeLeave(() => { ScrollTrigger.getAll().forEach(tl => tl.kill()); }) //Re-init scrolltrigger in after hook barba.hooks.after(initTimeline); Thanks in advance! Cheers
  2. Thanks @OSUblake for your quick reply! I'v tried the loop helper function and it works very nice! But i'm still wondering if it is possible with the scrub from the Scrolltrigger? Cheers!
  3. Hello Greensock forum, I'm using Greensock for a short while now and this is my first time on the forum. I was wondering if somebody can help me with my issue. What i'm trying to achieve is an effect i saw on this website: https://durimel.io/nel. I really like the seamless scroll loop in combination with the scroll scrub. Now i guess i'm pretty far with the seamless scroll loop (used this pen as reference: https://codepen.io/GreenSock/pen/QEdpLe), but i cant get the scrub working. scrub true; seems to work but then it scrolls way to fast, and when i'm setting scrub: 1 then it breaks completely I hope somebody can help me with the scrub issue, i think i can handle the seamless loop myself but if anyone has the time to wrap his head around that then that would be a nice bonus! Cheers