Share Posted September 10, 2020 Hello GSAP, I am wondering if ScollTrigger is usable with Pixi? I am creating a storytelling site where element movements are dependent on scroll triggers. I'm aware that browser scrollbar is needed for ScrollTrigger but a fullscreen Pixi canvas doesnt have scrollbars. Maybe I am taking the wrong approach here? Taking any help or suggestions. Here are a couple of examples. https://zumi.gucci.com/ https://go.pioneer.com/cornrevolution Thanks, much appreciated. Link to comment Share on other sites More sharing options...
Share Posted September 10, 2020 Hey kkim and welcome to the GreenSock forums. ScrollTrigger works great with Pixi (and all other Canvas and WebGL libraries)! Most likely what you want to do is make some fake content/height so that the page scrolls. For example you could do body { height: 300vh; }. This will make your webpage scroll. Once it scrolls, ScrollTrigger can use the scroll position to do what you need it to do To keep the Pixi canvas in place, give it position: fixed and make sure its width and height take up the full screen. Make sense? 3 Link to comment Share on other sites More sharing options...
Author Share Posted September 11, 2020 Thank you! It works 😃 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