Jump to content
Search Community

Not animating x1 and y1 properties for SVG line tag with gsap.quickTo

call007 test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hi everyone! I'm trying to animate x1 and y1 line attributes of an svg with gsap.quickTo by mousemove. But it doesn't work at all. Maybe I'm doing something wrong. Or maybe gsap.quickTo doesn't work correctly with these svg attributes. Anyway, please help me to understand how I can solve this problem. Thanks!

See the Pen abqgPYy by call007 (@call007) on CodePen

Link to comment
Share on other sites

  • Solution
16 hours ago, call007 said:

But I have the last question 😃 Is it possible to animate SVG attributes with gsap.quickTo function?

No, because .quickTo() is highly optimized to pipe things directly into the low-level PropTweens, skipping initialization, plugin parsing, etc. However, if your goal is to minimize memory (avoid creating a new tween on every mousemove), you could reuse the same tween and just invalidate().restart() it:

See the Pen KKQOGRm?editors=0010 by GreenSock (@GreenSock) on CodePen

 

Does that help?

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