Jump to content
Search Community

Mask, clippath or something to animate path svg

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

Just an additional note. You can also use a mask instead of clip-path if you like. You'd just need to make sure all the elements that make up the mask are filled with white. (With a clip-path, the color doesn't matter at all.) If you had a desire to have a stroke or gradient as part of the mask, you'd want to choose mask over clip-path.

 

Happy tweening.

:)

 

  • Like 3
Link to comment
Share on other sites

hmmm... I'm still not seeing the problem. It all looks fine to me. Are you seeing this in all browsers? All machines? What OS?

 

You could try setting the overflow with GSAP instead of your CSS. 

 

TweenMax.set(".logosAnimation", {overflow:"visible"})

 

If anyone else sees the issue please jump into the conversation. 

 

  • Like 2
Link to comment
Share on other sites

3 minutes ago, DevSaver said:

Sorry, I can't upload a file, GSAP processing problem!

 

Can you be more specific? You got an error message when trying to upload a screen capture? What was the exact error message? And can you just post the image somewhere else and put a link here? I'm not seeing any issues in that URL (but again, I might be looking in the wrong spot). 

  • Like 1
Link to comment
Share on other sites

okay, I was finally able to see the issue. You have to work pretty hard to make it happen and it doesn't happen consistently.

 

@GreenSock - what's happening is the glasses on the three logos that animate their y position should move over the head, but they're outside the SVG so overflow is set to visible. If you scroll to the top after the animation, refresh and then scroll down again, the glasses are clipped. 

 

FgUbMHv.jpg

 

It does not happen every time though. My guess is something is not ready on refresh, but checking a live site with all that code is  difficult. I can't imagine it has anything to do with GSAP.

 

@DevSaver you may want to just change the size of your SVG so the glasses are within the bounds and you don't have to worry about overflow. Just my two cents worth.

 

Happy tweening.

:)

 

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