Jump to content
Search Community

SVG Masks and Animation

kadams277 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm new to GSAP and SVG masks, and I'm attempting to make an SVG logo look like it's filling up with water. I've used

See the Pen RPvxGp by lbebber (@lbebber) on CodePen

by Lucas Bebber as a starting point. I've got the animation working, but I can't seem to get it to start from the bottom of the logo. I've tried working with a simpler circle SVG, but I'm having the same issue. I've played around with the different numbers in the attributes, but I can't seem to pinpoint my issue.

Thanks for any help!

See the Pen NeLWZX by kadams277 (@kadams277) on CodePen

Link to comment
Share on other sites

6 minutes ago, kadams277 said:

That's exactly it! Thank you so much! Guess I need to study up GSAP attributes now haha

 

Nah, there shouldn't be a huge learning curve in terms of what GSAP can animate - you pretty much point it at whatever properties you want to animate and it handles them for you. In this case it was just a matter of adjusting the "y" and "height" attributes on the SVG elements (well, animating those). 

 

Let us know if you need anything else. Happy tweening!

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