Jump to content
Search Community

ArturSimonyan

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by ArturSimonyan

  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

    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)), 

    See the Pen WNJgdmL by 1simonianartur1 (@1simonianartur1) on CodePen

  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 

    See the Pen vYjjdYP by 1simonianartur1 (@1simonianartur1) on CodePen

×
×
  • Create New...