Jump to content
Search Community

Dashed line with infinite loop, code correct?

coenhallie test
Moderator Tag

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

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