Jump to content
GreenSock

Gatodo

How to render the tween path

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'm trying this framework and looks great.

 

What I want to do is simple, I just need to render the path that an animated element is going to take.

 

for example if a have a TweenMax that moves a DIV from one position to another, then I want to render the line over which the DIV element is going to go.

I assume there is a property or some method, but can't find it.

How can I do that?

 

Thank you in advance.

Link to comment
Share on other sites

Welcome to the forums, Gatodo. And more importantly, welcome to GSAP :)

 

Are you asking how to literally draw a path on the screen, like using SVG or Canvas or something? That's not really something that GSAP does for you, but you should be able to use either SVG or canvas and draw a simple line between the starting coordinates and the ending coordinates. But again, it's not something that the animation framework does for you. 

 

Let us know if you need anything else. 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.
×