Jump to content
Search Community

frietsje

Members
  • Posts

    1
  • Joined

  • Last visited

frietsje's Achievements

  1. Hi all, I'm updating a website developed in 2016 and never touched again after that. The fact that back then the website was developed quite messy, and my lack of experience with GSAP makes it a bit more difficult. What I did so far was updating GSAP to the latest version, replacing all the TimelineMax and TweenMax with new functions like gsap.timeline and gsap.to. It also uses the ScrollMagic plugin, which is replaced by ScrollTrigger as I understand. I'm struggling a bit with that. How should I replace something like the next bit. The .Scene() is replaced? tween = gsap.timeline() .add([ gsap.to(".pagemenu-nav-single", 0.05, {opacity: 1}), //sometimes not present, throws console warning gsap.to(".pagemenu-nav-sticky-background", 0.05, {opacity: 1}) ]); this.set_triggerhook(); scene = new ScrollMagic.Scene({ triggerElement: ".navigation-pagemenu-container", // point of execution duration: 0, // pin element for the window height - 1 offset: pagemenu_triggerhook, triggerHook: 0, // don't trigger until #pinned-trigger1 hits the top of the viewport reverse: true // allows the effect to trigger when scrolled in the reverse direction }) .setTween(tween) .setPin(".navigation-pagemenu-container", {pushFollowers: false}) // the element we want to pin .addTo(scroll.controller()); Thanks in advance
×
×
  • Create New...