Jump to content
Search Community

Text reveal scrollTrigger

mcode test
Moderator Tag

Recommended Posts

Hi to everyone, 

 

I would like your help for an animation on window resize. I am struggling to fix the issue with no luck so far.

The problem occur when I have the screen size at 900px and the text lines starting to reveal, if I resize the window the scrollTrigger not recalculate the values.

I am using "rem values" in the whole website so it's important to not use "pixels". Maybe this causes the problem... I don't know.

I will appreciate it, if anyone can give me a good advice or give me an example how to implement the same animation in a different way.

 

Thanks in advance,

 

 

See the Pen vYWmJYw?editors=1010 by gtara (@gtara) on CodePen

Link to comment
Share on other sites

Hi Osublake!,

 

Thanks for the quick answer!

As I  understand  the class "tt-scroll__title" not update the correct values on window resize. Am I right.. or am I missing something else?

I have created a new window Resize function to recalculate the "this.titleWidth" but the problem still occurs.

Can you please give me an example on how I can update those values? 

 

Thanks in advance!

Link to comment
Share on other sites

You've got a lot of stuff going on in that pen, so I'm not exactly sure what you're looking for.

 

One thing I noticed is that you have a percentage based transform set in your CSS, but GSAP doesn't know that because of how the browser reports transforms as a matrix.

 

So I set the transforms with GSAP and then use yPercent to animate. Is that the problem you were referring to?

 

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

 

  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

Hello again! OSU blake i have add sections above section with animation and nothing works well. You can see the markers loss the position. I cant find the problem caused that!

I have made a copy from your codepen.

See the Pen vYWmJYw by gtara (@gtara) on CodePen

Can you help me?

Thanks in advanced!

 

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