christof Posted May 14, 2022 Share Posted May 14, 2022 I would like to know if it is possible to use this type of effect by combining locomotive scroll and scroll trigger See the Pen dyJLWwE by christophedelamare (@christophedelamare) on CodePen I managed to get the locomotive scroll and scroll trigger to work together but I don't see how it is possible to reproduce the effect. wish with the virtual scroll If anyone can point me in the direction of a possible solution I would be very pleased See the Pen rNJWvBd by christophedelamare (@christophedelamare) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted May 14, 2022 Share Posted May 14, 2022 LocomotiveScroll isn't a GreenSock product, so we can't really support it here - is there a reason you're not just using ScrollSmoother instead?: See the Pen OJQbEQE?editors=0010 by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
christof Posted May 15, 2022 Author Share Posted May 15, 2022 Thank you very much for this answer, I hadn't updated myself on the new greensock, I will definitely use it on my next projects! I've taken my sticky bar out of the scroll locomotive container so I don't have to worry about that anymore. So I modified my code like this See the Pen zYRNYmP by christophedelamare (@christophedelamare) on CodePen I have one last question, how can I create a scroll effect with the texts rather than a brutal replacement? Link to comment Share on other sites More sharing options...
GreenSock Posted May 16, 2022 Share Posted May 16, 2022 11 hours ago, christof said: I have one last question, how can I create a scroll effect with the texts rather than a brutal replacement? I'm not sure I understand your goal correctly, but I could imagine multiple ways of doing this: Put all the text blurbs stacked inside that red sticky bar (so only one shows at a time) and then fire off an animation of the "y" property of the container to "scroll" them. Only have two elements, one that's entering and one that's exiting. Dynamically populate them and animate them as you need (again, the "y" or "yPercent" property) Good luck! 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