Share Posted December 13, 2016 hi a have 2 svg path , i want create a animation wave draw with gsap . 1 line animated from right to left and other line left to right wave repeatly ,,, how can create this? thanks See the Pen vyVYJr by proweb1991 (@proweb1991) on CodePen Link to comment Share on other sites More sharing options...
Share Posted December 13, 2016 In many ways: With DrawSVG Plugin: See the Pen zomYXE?editors=1010 by dipscom (@dipscom) on CodePen Without DrawSVG Plugin: See the Pen rWqNom?editors=1010 by dipscom (@dipscom) on CodePen 6 Link to comment Share on other sites More sharing options...
Author Share Posted December 13, 2016 In many ways: With DrawSVG Plugin: See the Pen zomYXE?editors=1010 by dipscom (@dipscom) on CodePen Without DrawSVG Plugin: See the Pen rWqNom?editors=1010 by dipscom (@dipscom) on CodePen it's awesom, you are my hero ... 1 Link to comment Share on other sites More sharing options...
Share Posted December 13, 2016 I am nuthin' These are the ones you should look up to: http://greensock.com/forums/topic/15588-dragging-masked-svg-path/?p=67966 4 Link to comment Share on other sites More sharing options...
Author Share Posted December 13, 2016 I am nuthin' These are the ones you should look up to: http://greensock.com/forums/topic/15588-dragging-masked-svg-path/?p=67966 I will definitely study, thx just a question : in my sample ( See the Pen vyVYJr by proweb1991 (@proweb1991) on CodePen ) when svg draw completely , i want the line #1 (line Right to left ) countio draw svg even draw is complete to exit from display pane (like picture ): how can do this? Link to comment Share on other sites More sharing options...
Share Posted December 13, 2016 Hey proweb1991, can you re-phrase your question? I am not sure I understand the question. Are you asking: Can the line be drawn from right to left, then be erased from right to left, instead of reversing? Link to comment Share on other sites More sharing options...
Share Posted December 13, 2016 in addition to Dipscom answer , if I understand correctly ; pls try this : var tl = new TimelineMax({ repeat:-1, yoyo:true, repeatDelay:1 }) .from(["#path1","#path2"], 1, {drawSVG:"0%", ease:Power2.easeInOut}) .to(["#path1","#path2"], 1, {drawSVG:"100% 100%", ease:Power2.easeInOut}) 6 Link to comment Share on other sites More sharing options...
Author Share Posted December 13, 2016 Hey proweb1991, can you re-phrase your question? I am not sure I understand the question. Are you asking: Can the line be drawn from right to left, then be erased from right to left, instead of reversing? Exactly ... Link to comment Share on other sites More sharing options...
Author Share Posted December 13, 2016 in addition to Dipscom answer , if I understand correctly ; pls try this : var tl = new TimelineMax({ repeat:-1, yoyo:true, repeatDelay:1 }) .from(["#path1","#path2"], 1, {drawSVG:"0%", ease:Power2.easeInOut}) .to(["#path1","#path2"], 1, {drawSVG:"100% 100%", ease:Power2.easeInOut}) thank you bro ... My problem was solved thank Dipscom too ... just a question . in to state , why use two 100% (drawSVG:"100% 100%") ?? what is this Hundred precentages? Link to comment Share on other sites More sharing options...
Share Posted December 13, 2016 It's because one is for the start of the path and the other is for the end of the path. If you wanted your line to be drawn from the center to the extremities, you would do something like: TweenMax.fromTo("path", 1, {drawSVG:"50% 50%"}, {drawSVG:"100% 100%"}) The docs have all of the details nicely explained and examples. 2 Link to comment Share on other sites More sharing options...
Share Posted February 24, 2019 how to change background from the line to the bottom of the div (on complete)? thanks Link to comment Share on other sites More sharing options...
Share Posted February 26, 2019 Hi DAM, I am not sure I understand your question here. Can you rephrase it? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now