Beamish7 Posted February 8, 2020 Share Posted February 8, 2020 I'm creating a series of icons to animate, but I need to trigger the animation when they come into view (they occur near the footer of the page). I've tried a variety of solutions, including ScrollMagic based upon a solution offered in this forum, but without success. Any suggestions? Are already discussions on this topic? Thanks See the Pen Jjdopmp?editors=1111 by McKern (@McKern) on CodePen Link to comment Share on other sites More sharing options...
mikel Posted February 9, 2020 Share Posted February 9, 2020 Hey @beamish, Welcome to the GreenSock Forum. You could use the intersectionObserver. Here is a crisp tutorial. In this example the container is observed. With a threshold of 0.5: If 50% of the container is visible in the viewport, the animation is triggered. See the Pen LYVEJWp by mikeK (@mikeK) on CodePen And you could use the new gsap 3! Happy tweening ... Mikel 2 Link to comment Share on other sites More sharing options...
yeisonvelez11 Posted December 10, 2020 Share Posted December 10, 2020 I think it is not the best place to ask this question, but could you please explain to me what this line does? end: "+ = 50%", it is supposed to receive 2 values ... I understand that the "+" indicates that it will execute "after", but in this case I am not sure (I refeer this codepen See the Pen b5f16030823680f5c5e57b33a5cf86c6 by GreenSock (@GreenSock) on CodePen ) Link to comment Share on other sites More sharing options...
ZachSaucier Posted December 10, 2020 Share Posted December 10, 2020 @yeisonvelez11 That means that the end position is 50% of the trigger's height after the start point. Perhaps the ScrollTrigger explanation video listed in the docs will be of more help in terms of your understanding. 1 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