Jump to content
Search Community

Animating linear fill in an SVG

Tom Roberts test
Moderator Tag

Recommended Posts

Hi Greensockers!

Can you help? I have an animation where I would like to make a gradient fill 'flow', basically make the colours top and bottom swop.

I have looked on the forums and a lot of the suggestions are really old and didn't reference GSAP3.

Do I need an additional plugin to achieve the effect (MorphSVG)?

Thanks

 

See the Pen ZEWgzgp by neilb1969 (@neilb1969) on CodePen

Link to comment
Share on other sites

Usually animating gradients involves animating the stop color and/or offset. Here's a couple old examples that I just updated to GSAP 3. The first animates the stopColor and the second shows animating the offset.

 

See the Pen bMxqYR by PointC (@PointC) on CodePen

See the Pen xJOrWG by PointC (@PointC) on CodePen

 

Hopefully these help. Happy tweening.

  • Like 3
Link to comment
Share on other sites

  • 2 months later...

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