Jump to content
Search Community

Relative value don't start on initial position when repeated

AlexDrop test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Click open / close, wait for animation and repeat.

 

When repeating animations of a timeline previous reversed and cleared, the relative value of properties keep tracking the last position and not the initial, so the menu voice are going away.

 

Probably is the right behaviout, but how can I achieve the result that I want?

 

I think the error is in the showLink() function. I reset and recreate each time the timeline in this function (and not once globally like the menu background) cause the animated elements change by user click (man / woman / kids) that are not in this example

See the Pen NZpWRa by KickinAss (@KickinAss) on CodePen

Link to comment
Share on other sites

Thank for the suggestion. Was my first attempt, I separeted the background, from the tween, cause the background may reamain open.

 

Imagine 3 buttons, Menu 1, 2, 3

 

Once the menu is open, if I press the same button the menu completely close, if I press another button I want close the voices , and the n open the others, while the background remain in place. Pheraps I can't stop the reverse until the background animation e restart forward when changed the voices.

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...