IndM Posted July 7, 2023 Share Posted July 7, 2023 What is the best way to trigger an other animation on the pinned item (in this case the image) depending on what section is in view? I've tried with creating seperate scrollTriggers for it but I can't figure out why this won't work. See the Pen GRwMEye?editors=1111 by indy-meermans (@indy-meermans) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted July 7, 2023 Share Posted July 7, 2023 Hey, there's a load of demos here which may helphttps://greensock.com/st-demos/  If you add markers and console logs it may be easier for you to debug too. At the moment your markers are positioned after the element is unpinned. See the Pen vYQeevW?editors=1011 by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
IndM Posted July 7, 2023 Author Share Posted July 7, 2023 I cannot find the solution 😕 Perhaps I should restart and find an other solution, to achieve this kind of animation. Link to comment Share on other sites More sharing options...
Rodrigo Posted July 7, 2023 Share Posted July 7, 2023 Hi, Â Maybe the examples in this thread and the examples in the other threads linked in that one as well, could help: Â Happy Tweening! Link to comment Share on other sites More sharing options...
IndM Posted July 11, 2023 Author Share Posted July 11, 2023 Hi @Rodrigo, @Cassie! I've reworked it based on your tips! Is it possible that you guys can give me some tips, or what I should have done better? Thanks in advance 🤙 See the Pen bGQYKbW by indy-meermans (@indy-meermans) on CodePen  Link to comment Share on other sites More sharing options...
Rodrigo Posted July 11, 2023 Share Posted July 11, 2023 Hi,  Maybe the only thing I would try is to create a timeline and see if that simplifies something somehow. But that would require to use a bunch of call methods in order to trigger some animations and check the direction of the ScrollTrigger instance in order to see in what direction the animation should go.  I think what you have right now is working so, if is not broken, don't fix it   Happy Tweening! 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