Keipen123 Posted August 17, 2020 Share Posted August 17, 2020 Hello, I am having a problem in making motions with Scroll Trigger. I am trying to make an SVG appear when triggered, and disappear after a few scrolls. I tried making two separate timelines for each motion, which did not work at all... ,and I have also tried using .reverse( ) or .fromTo( ) with no avail. Would any of you guys teach me how to make my SVG appear and later on disappear using the scroll trigger? To get the precise image of what motion I am trying to make: I want this appearing and disappearing to be triggered through scrolling. I am sorry, I cannot provide a codepen of my project (as I do not have the pro to upload the svg assets), instead I will clip a video of what I my current circumstance. I am trying to make the forest kinda thing sink out of the view after another stroke of scrolls. Please help me out here. Sincerely, Link to comment Share on other sites More sharing options...
mikel Posted August 17, 2020 Share Posted August 17, 2020 Hey @Keipen123, Welcome to the GreenSock Forum. This is an option to make someone pop up briefly and definitely go away again. See the Pen abNZvxV by mikeK (@mikeK) on CodePen Does that help? Happy scrolling ... Mikel 2 1 Link to comment Share on other sites More sharing options...
mikel Posted August 17, 2020 Share Posted August 17, 2020 ... and here a more complex landscape See the Pen ZEbWoem by mikeK (@mikeK) on CodePen 2 1 Link to comment Share on other sites More sharing options...
Keipen123 Posted August 17, 2020 Author Share Posted August 17, 2020 Thank you very much for the replies and advices! The "Just Do It......" example showed me well on how to make objects appear and disappear. However, although I may sound very clamorous, as I implemented the code, I felt that the disappearing motion, after the appearing motion, came a little too instantaneous. I prefer there being some time lag between the appearing and the disappearing of the svg. And to be much more demanding, I figured that I may want the svg to scale larger as it is gradually disappearing. I am sorry it may be a turn down of the options @mikel provided me, but is it possible to create a time lag between appearing and disappearing of a single svg, and also add certain things particularly on either of the motion? Sincerely, Link to comment Share on other sites More sharing options...
mikel Posted August 17, 2020 Share Posted August 17, 2020 Hey @Keipen123, Time lag: change repeatDelay - and play with the end figure e.g "+=2000" Larger: you could scale the SVG or parts of it. Although I don't want to see him for so long - he always puffs up like that, here's an example: See the Pen rNeLjby by mikeK (@mikeK) on CodePen Just test some alternatives ... Mikel 3 1 Link to comment Share on other sites More sharing options...
Keipen123 Posted August 17, 2020 Author Share Posted August 17, 2020 Thank you very much @mikel! It really helped a lot! 2 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