Jump to content
Search Community

draw svg on scroll

proweb1991 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 create a draw svg on scroll effect on demo.

i have 2 questions ...

 

1: this svg paths not draw on scroll and and draw all paths when arrived at target point ...
how can config this svg paths draw only on scroll??

 

2:in inverse scroll svg paths must be inverse draw ,However in my sample it dose not happend ...

 

can anyone help me please??

 

thanks

See the Pen GNxYaR by proweb1991 (@proweb1991) on CodePen

Link to comment
Share on other sites

Hi proweb1991,

 

Are you by any chance inspired by this site: http://le-mugs.com/ ? This is just out of curiosity as there's been a few questions in the past couple of weeks that were either directly referencing the site or, like yours, seem to be inspired by the site's animation. :)

 

Anyhow, firstly, the main issue here is to do with how ScrollMagic is being triggered, please bear in mind that ScrollMagic was not created by Greensock nor it is maintained by the folks behind GSAP. 

 

Having said that, there's no harm in helping you out.

 

The main issue seems to be due to the fact that you are defining the trigger object as your main object container and thus, when the page loads, it is automatically triggering the start of the animation. If you offset the position of the container, things seem to work as one would expect.

 

See a simplified version here: 

See the Pen jVxNRV?editors=0110 by dipscom (@dipscom) on CodePen

  • Like 2
Link to comment
Share on other sites

Hi proweb1991,

 

Are you by any chance inspired by this site: http://le-mugs.com/ ? This is just out of curiosity as there's been a few questions in the past couple of weeks that were either directly referencing the site or, like yours, seem to be inspired by the site's animation. :)

 

Anyhow, firstly, the main issue here is to do with how ScrollMagic is being triggered, please bear in mind that ScrollMagic was not created by Greensock nor it is maintained by the folks behind GSAP. 

 

Having said that, there's no harm in helping you out.

 

The main issue seems to be due to the fact that you are defining the trigger object as your main object container and thus, when the page loads, it is automatically triggering the start of the animation. If you offset the position of the container, things seem to work as one would expect.

 

See a simplified version here: 

See the Pen jVxNRV?editors=0110 by dipscom (@dipscom) on CodePen

 

thank you my dear friend ...

yes I have to get my inspiration from this site , because i have a order from customer to create a template Similar to that site(with all of effects) ... And I am not professional  in the Gsap + ScrollMagic animation ... 

 I am learning this interesting features  8-)  :-)  But I do not have a good reference to use this plugins :-(

 

 thank you bro for your Guidance... 

so , if  use offset my problem is solved ,

:-D

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