Jump to content
Search Community

Svg drawing line animation

Giuseppe Simonetti test
Moderator Tag

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 everyone! I'm trying to find a good solution for an animation that i have to create. My goal is to have a line in svg that draws a constellation, in every corner of this line there is a "star", and i would like to have something like a "pulse" animation whenever the line reaches the single star, and a text near every star with a fade in animation. I attach an image that shows the final result i want to reach. Does anyone has some tips? I made some tries so far, but i can't reach a good looking animation.

example.jpg

Link to comment
Share on other sites

Hi @Giuseppe Simonetti,

 

Welcome to the forum.

 

I think @mikel has a nice solution for you there.

 

It was unclear to me if this was a scroll triggered animation or something full screen. You mentioned trying some things so we'd certainly take a look at what you have so far. Maybe you could make a demo? More info:

Happy tweening and welcome aboard.

:)

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, PointC said:

Hi @Giuseppe Simonetti,

 

Welcome to the forum.

 

I think @mikel has a nice solution for you there.

 

It was unclear to me if this was a scroll triggered animation or something full screen. You mentioned trying some things so we'd certainly take a look at what you have so far. Maybe you could make a demo? More info:

Happy tweening and welcome aboard.

:)

Hi! i just recreated the image in svg with path, text and circle elements.. now i "just" have to animate them one by one, now i'm working on local so i can't submit my other tries, but the first try that i made is : 

 

[link removed for domain with inappropriate content]


Now that i have the svg, i'm looking for a good animations (on page load, not on-scroll). As you see in my first try, i made some animations but with all the delays set manually, and it's very  weary for me, and the result isn't what I need: the animations should be faster, and cool.. the "timeline" should be something like: the star appears in with a blink effect, the first text on the left fades in, then the text on the right , meanwhile the line starts the draw animation, whet it reaches the second star, this one blinks as the first, second text fades in and the third as well... and so on until the end of the line

 

Quote

 

 

Edited by GreenSock
Domain had inappropriate content
Link to comment
Share on other sites

  • 6 months later...

Hey @PointC, this is really helpful, thanks for posting. Would you be able to share the illustrator file for the line with the dots so I can see how the asset set-up is done? I need to create something for a subway map, so it would be good to see how the lines need to be set up in Illustrator. Thanks!

Link to comment
Share on other sites

  • 4 years later...

Hi @eavitan and welcome to the GSAP Forums!

 

Do you have a minimal demo that we can have a look at?

 

We have a pathEase helper function that can help in those cases as mentioned in this thread:

 

You can fork this demo that loads all the GSAP Plugins in order to create your own (just remember to keep it simple)

See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen

 

Happy Tweening!

Link to comment
Share on other sites

Hey Im working on this currently:

See the Pen yLdWdNj by Eyal-Avitan-the-builder (@Eyal-Avitan-the-builder) on CodePen

 

and this is the brief that i got: https://tinyurl.com/25p9dgtj

 

A customer asked me to find someone to do it but kinda found it amusing to try myself as I used to do Webgl for pleasure.

 

it suppose to scroll on the left and load this extra SVG, managed to do this for now, what im missing is:

loading the points on the svg grid on scroll,

load a vertical line

and load the text.

 

I think my main struggle is to declare the positioning on scroll, and from there i think its just drawing SVG's

 

this is kind of the goal, but horizontal  

See the Pen QREjpr by mikeK (@mikeK) on CodePen

 

thanks for your help

Link to comment
Share on other sites

You have to find a way to move the SVG in the same amount as the horizontal movement as the DrawSVG Plugin draws the line.

 

You can create a single timeline and add both instances (the one that draws the SVG and the one that moves the SVG horizontally) at 0 seconds and give them the same duration. You can use the position parameter for that.

 

Also you can try the approach in these demos:

See the Pen MWPOQmo by GreenSock (@GreenSock) on CodePen

 

See the Pen MWqWvom by GreenSock (@GreenSock) on CodePen

 

Hopefully this helps

Happy Tweening!

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