Jump to content
GreenSock

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

marco.fugaro

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by marco.fugaro

  1. I have a gsap timeline, which I trigger on hover and play it reversed on mouseleave.

     

    However I need to change the easing when I play the timeline reversed. Is there a way I can do this without duplicating the whole timeline again?

     

    Here is a stripped down example, full example is in the codepen.

     

    const ease = 'power2.out'

    const tl = gsap.timeline({ paused: true })

    // tweens here...


    card.addEventListener('mouseenter', (e) => {
      tl.play()
    })

    card.addEventListener('mouseleave', (e) => {
      // need to somehow change the easing to 'power2.in' here
      tl.reverse()
    })

     

    See the Pen abpZWOJ?editors=0010 by marco_fugaro (@marco_fugaro) on CodePen

×