Jump to content
Search Community

theRemy79

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by theRemy79

  1. @GreenSock

     

    In your example above from codepen if you change the yPercent to xPercent you get the effect of right to left instead of down to up, then I assumed if you changed xPercent 1 ? 100 : 0 to xPercent 1 ? 0 : 100 but that doesn't seem to work.

     

    panels.forEach((panel,i)=>{
          // first panel should start already in place, and last panel should end in the center. 
          tl.fromTo(panel, { 
            xPercent: i ? 100 : 0
          },{
            xPercent: i === panels.length - 1 ? 0 : -100,
            duration: i === 0 || i === panels.length - 1 ? 0.5 : 1,
            ease: "none",
          }, "-=0.5");
        });
×
×
  • Create New...