Jump to content
GreenSock

ArturSimonyan

Members
  • Posts

    3
  • Joined

  • Last visited

ArturSimonyan's Achievements

  1. Hello masters of animations Try to adaptive this demo to my own slider but i can't find the right formula to recalculate slides position and trigger active slide when slide touch the right border of div.slider. Slides count can be from 2 to n+. This is the best thing I came up with. You can change in html slides number and see wrong work of this code https://codepen.io/1simonianartur1/pen/WNJgdmL start: () => "top top-=" + (slide.offsetLeft - window.innerWidth / slide_arr.length) * (max_width / (max_width - window.innerWidth)), end: () => "+=" + (slide.offsetWidth + gsap.getProperty(slide, "marginRight")) * (max_width / (max_width - window.innerWidth)),
  2. Hi! Please help me to solve problem with my scrollTrigger animation. I need to change body background color on page scroll event. Also i have a pinned section.advantages with another horizontal scrollTrigger inside. The problem is that the animation of changing the background color does not stop when section.advantages is pinned. I need to continue color animation only after i go to the end of advantages slider. Codepen demo https://codepen.io/1simonianartur1/pen/vYjjdYP
×