Jump to content
Search Community

Issue: Latest version of GSAP not tweening mask-position

davi test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Latest version of GSAP (3.11.3) doesn't seem to want to animate mask-position.

Here's a couple demos showing the issue.

All that it is is a gradient wipe effect revealing the text from left to right.

1) Uses the exact same code, except uses the latest version of GSAP (3.11.3)
2) Uses an older version of GSAP (3.5.1) – works as intended.

 Can we get a fix pretty please? 😊 

See the Pen GRdaVeY by Davi-T (@Davi-T) on CodePen


See the Pen vYjwoqa by Davi-T (@Davi-T) on CodePen

Link to comment
Share on other sites

  • Solution

Hi @davi. Sorry about any confusion there. It looks like the problem is that you're using an invalid value for that. In other words, element.style.maskPosition = -1200 isn't valid; it should be "-1200px 0px" for example.

 

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

 

Also notice that you don't need to animate BOTH maskPosition AND webkitMaskPosition. GSAP automatically attempts to fall back to prefixed values.

 

I understand that it might seem odd that the older version would automatically fix that for you, but the newer versions of GSAP work around various other edge cases and open up new possibilities that make the old way of processing values like that problematic. It really shouldn't have worked previously to pass in an invalid value like that :) Again, I apologize if that was confusing. 

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