Jump to content
Search Community

Question about JumpStart

pixeldroid
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

pixeldroid
Posted

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.

Posted

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
pixeldroid
Posted

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.

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