Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
nathan30

Animate SVG line

Go to solution Solved by cstodor,

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

Hi,

 

I just found this amazing lib and I want to use it into my project.

 

I want to make some animated skills bar. For this, I need to modify the "x2" property of my SVG line

 

Is it possible to do this with GSAP ? If yes, can you guide me ?

 

Thanks in advance for your help

See the Pen GZzZQV by nathan30 (@nathan30) on CodePen

Link to comment
Share on other sites

  • Solution

Hi,

 

Yes it is possible. To animate SVG attributes, you will need to use the AttrPlugin by GSAP.

You can find more info about animating SVG  on this page: http://greensock.com/svg-tips

 

Codepen URL: 

See the Pen LNqNBM by cstodor (@cstodor) on CodePen

 

Cheers,

  • Like 1
Link to comment
Share on other sites

Woaw, thanks a lot both of you. This is exactly the result I want :)

 

I'll read more about this awesome lib :D

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