momo12 Posted September 15, 2023 Share Posted September 15, 2023 Guys do images have any attribute, so they be fixed but the we can change the mask layer scale like this animation? Link to comment Share on other sites More sharing options...
Solution mvaneijgen Posted September 15, 2023 Solution Share Posted September 15, 2023 Sure thing, not really a GSAP question, but have you seen css clip-path. I always use https://bennettfeely.com/clippy/ to create my shapes, note that to have GSAP tween this value, make sure you animate between shapes that have the same amount of points and that the strings have the same values suffix (my rule: give every number a % sign, even if the tool above doesn't put one). Hope it helps and happy tweening! See the Pen GRPvdPY?editors=0110 by mvaneijgen (@mvaneijgen) on CodePen 3 Link to comment Share on other sites More sharing options...
momo12 Posted September 15, 2023 Author Share Posted September 15, 2023 15 minutes ago, mvaneijgen said: Sure thing, not really a GSAP question, but have you seen css clip-path. I always use https://bennettfeely.com/clippy/ to create my shapes, note that to have GSAP tween this value, make sure you animate between shapes that have the same amount of points and that the strings have the same values suffix (my rule: give every number a % sign, even if the tool above doesn't put one). Hope it helps and happy tweening! See the Pen See the Pen GRPvdPY?editors=0110 by mvaneijgen (@mvaneijgen) on CodePen by mvaneijgen (@mvaneijgen) on CodePen Thanks a lot for it! I knew about css clip-path but couldn't animate it with GSAP but now I see what you mentioned about your rule which solved my problem! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now