Jump to content
GreenSock

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

Dashed line with infinite loop, code correct?

Go to solution Solved by Carl,

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 wanted to create a dashed line with an infinite loop, I finally have the result I wanted with just a few lines of code :-) (took a few hours to understand the relationship between the code elements as I have no experience with JS at all). Before I implement it into my website I would like to know if I did it correctly. 

 

Thanks for checking out my code!

 

 

Here is my CodePen: 

 

 

Cheers,

 

Coen

See the Pen EZaRyp by coenhallie (@coenhallie) on CodePen

  • Like 2
Link to comment
Share on other sites

  • Solution

Thanks for sharing. Although its not a lot of code, its definitely a clever effect and very cool even for people with some prior JS experience.

 

Since you are are a Club member be sure to check out DrawSVG: https://greensock.com/drawSVG

 

It wasn't designed to move dashes around like that, but I suspect you will find something fun to do with it :)

  • Like 5
Link to comment
Share on other sites

Hi coenhallie :)

 

Welcome to the GreenSock forums.

 

That looks right to me. Good job.

 

Since you're a Club member you also have access to all the cool plugins like drawSVG for stroke animations too.

 

Happy tweening and welcome aboard.

:)

  • Like 2
Link to comment
Share on other sites

Geez - I have to type faster.  :D

  • Like 3
Link to comment
Share on other sites

Geez - I have to type faster.  :D

 

Perhaps reading my mind while you type is slowing you down? 

 

:-P

  • Like 4
Link to comment
Share on other sites

Awesome! It's motivating to hear both of you guys like the code!

 

Thank you both for reviewing the code and for your quick response :-)

 

 

Cheers,

 

Coen

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