Jump to content
GreenSock

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

Too many of "from" tweens

Recommended Posts

Have faced that need to work with a multiple "from" tweens with a same element.

Of course that gave me a wrong experience with using such a "structure", like:

tl.from(Intro_logo, .5, {opacity: 0})
//bla bla other tweens
tl.to(the.Intro_logo, 0.25, {opacity: 0}, 'second_frame_start')
//bla bla other tweens
tl.set([Copy, Intro_logo], {className:"+=next-step"})
//bla bla other tweens
tl.from(Intro_logo, 0.75, {opacity: 0, x: '-30%'})

will give me the result that my Intro_logo will have on the very beginning of the animation the positioning of x: -30% (as example).

 

How can I figure it out? Because, with my current job I will have to challenge it always. Thanks in advance!

Link to post
Share on other sites

As a rule of thumb, you should limit using .from() tweens to only the first tween of the element, it really can cause confusion and not pleasant behaviour.

 

However, if you must work with it, for whatever reason that might be, you just need to grasp the immediateRender property and how GSAP works with it.

 

Carl does, as always, a great job of explaining it all in the following video: 

 

It should set you on your path.

  • Like 1
Link to post
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.

×