Jump to content
Search Community

Animating an SVG filter variable on hover

ownage 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

First off, thank you for the MOST EXCELLENT plugin TweenMax! I couldn't find ANY OTHER WAY to animate this variable than through <animate> which by itself really appears to be hard to work with on multiple paths within a single SVG.

 

My goal is to animate feGaussianBlur's variable "stdDeviation" from 0 to 7 on mouse in.... and 7 to 0 on mouse out... not just once, but an unlimited number of times. While the first path object is still animating, the second path object should also be able to animate separately. It's not just two paths though, and my attempts to fix this with a couple "setTimeouts" is questionable-- in reality I will actually have 68 different paths that would technically require separate/individualized animation. I'm not sure if my approach is on the right track, but I'm pretty new to this and would really appreciate your support! :)

 

Thank you again!

See the Pen arQENZ by ownage (@ownage) on CodePen

Link to comment
Share on other sites

I owe a HUGE thank you to you... You, sir, are an intellect, gentleman and scholar! This has got to be as clean as it gets.

 

Looks like this will work just fine with TweenLite as well?

 

Thank you! :)

  • Like 3
Link to comment
Share on other sites

1 hour ago, ownage said:

P.S. I tried this with TweenLite and am not sure why this isn't working as play() & reverse() are both in the docs. Just wanted to verify...

 

play and reverse are working fine. The problem is that you're missing the AttrPlugin, which comes with TweenMax.

https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/plugins/AttrPlugin.min.js

 

 

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