Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Catalin R.

Mask, clippath or something to animate path svg

Recommended Posts

Hi,

I want to animate some paths svg like below (see images, please).

Has anybody any idea?

Thanks!

 

svg-1.jpg

svg-2.jpg

svg-3.jpg

See the Pen NMNwpV by ZenTao (@ZenTao) on CodePen

Link to comment
Share on other sites

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

Hi,

Is there any posibility to see the entire glasses? From y:-308 to y:0

How to animate the glasses beyond svg parent?

See the Pen NMNwpV by ZenTao (@ZenTao) on CodePen

Thanks!

Edited by DevSaver
Link to comment
Share on other sites

All you'd have to do is set your SVG overflow to visible.

 

.logosAnimation {
  overflow: visible;
}

 

Happy tweening.

:)

 

  • Like 2
Link to comment
Share on other sites

Hi, PointC

I've used this but there's a problem.  With clear cache works well, and after I refreshed the page this overflow: visible; doesn't work anymore.

Link to comment
Share on other sites

That seems odd. I'm not seeing that in any browser. I just tested in FF, Chrome and Edge and overflow stayed visible for me after refresh.

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

I'm not seeing any issues, but maybe I'm looking at the wrong thing. @DevSaver can you post a screen capture and tell us exactly what OS and browser it's in?

  • Like 1
Link to comment
Share on other sites

Hi,

https://devsaver.com/php-web-content-management-system/

After a clear cache for this page all animations are right.

Click back-to-top button or scroll up the page, refresh the page and scroll down to the animations.

Appears a bug like in screenshot.

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

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

The message is:

There was a problem processing the uploaded file. Please contact us for assistance.

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

Thanks PointC! Thanks for the real support! :-)

  • Like 3
Link to comment
Share on other sites

You're welcome. I'm always ready to do battle with SVGs. 

 

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