Jump to content
GreenSock

pixeldroid

Question about JumpStart

Moderator Tag

Recommended Posts

Quick question about the TimelineMax Jump Start at:

See the Pen ryfJu by GreenSock (@GreenSock) on CodePen

What is the purpose of "textEffect" in

tl.staggerFrom(txt, 0.4, {alpha:0}, 0.06, "textEffect");

I don't understand the use of a string as the final param in this function call.

Thanks.

See the Pen ryfJu by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

The final param is the position parameter which controls at which time the animation will be inserted.

 

What is happening there is that it is inserting that animation at a label of "textEffect" so that the next animation can be placed at the exact same time.

 

note both animations use "textEffect" as the position parameter. 

tl.staggerFrom(txt, 0.4, {alpha:0}, 0.06, "textEffect");
tl.staggerFrom(txt, 0.8, {rotationY:"-270deg", top:80, transformOrigin: "50% 50% -80", ease:Back.easeOut}, 0.06, "textEffect");

 

Definitely check out this comprehensive overview of the Position Parameter.

  • Like 3
Link to comment
Share on other sites

To clarify, in the codePen example, you don't use "add" to insert the label.  This suggests that a label is declared upon first useage.  Is that correct?

Thanks.

Link to comment
Share on other sites

yup, that's it.

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.
×