Jump to content
Search Community

Is this possible to create easily with GS?

Robbor 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 there, 

I'm new to svg animation and started my research on what (js library) I need for my project.  And if I even need one. 

I want to rebuild something like the link below. Basically just using another path. I saw the path is not an svg but created using javascript. I would prefer to just export my illustrator path as svg and then animate it.  But thats details. I played around with some basic js. Im not new to js or vector graphics. So drawing an svg path connected to scrolling is not the problem. But what I did not understand or know how to solve are things like: length of drawn line, red dot positioning, fade in objects fill, keeping focus when the line draws vertical objects and the craziest part when the dot and the line ends in the heart at very bottom. 

 

Final:

https://www.lemonade.com/giveback-2019

 

Very first basic approach

 

Excuse my poor english fellas. 

 

Cheers 

robbor

See the Pen bGbaGeY by robbor (@robbor) on CodePen

  • Like 1
Link to comment
Share on other sites

Hello Robbor and welcome to the forums!

 

2 hours ago, Robbor said:

what I did not understand or know how to solve are things like: length of drawn line,

This is easy with GSAP's DrawSVG's .getLength() method.

 

2 hours ago, Robbor said:

red dot positioning

This is done using the same path layered on top of the path that you're drawing. But a different stroke is used, including stroke-linecap: round; and stroke-linejoin: round; to make it circular. It has the class of .ksqlFD in that live page.

 

2 hours ago, Robbor said:

fade in objects fill

Again, this is done using layering. The heart (and things in it) are separate from the line drawing, just layered behind it. SVG keeps them lined up easily. At that point in the page, they just fade in the heart.

 

Hopefully that is helpful. Mikel's demos show a basic way of how to implement this with and without ScrollMagic.

 

Happy tweening!

  • Like 2
Link to comment
Share on other sites

29 minutes ago, Robbor said:

Do you guys think I even need a complex library like GS or is it possible with some basic javascript?

We might be a little biased on this forum ;) 

 

It mainly boils down to: how much time do you want to have to worry about the implementation details vs how much time do you want to spend implementing the effects? GSAP can handle a lot of the details for you, leaving you to mostly the creation of the animation itself. You technically can do everything that GSAP can do without GSAP, but GSAP will likely save you a bunch of time (and therefore likely money in the long run). 

 

I’m pretty confident you’ll find that the license pays for itself very quickly when you consider the time it saves you, the added capabilities, performance, reliability, etc. Typically our customers find that it pays for itself literally in a matter of days (or weeks at the most). But if you’re not happy we’ll gladly issue a full refund. We’re passionate about having happy customers around here. 

  • Like 2
  • Haha 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.
×
×
  • Create New...