Vineeth Achari Posted August 20, 2020 Share Posted August 20, 2020 How to create a ScrollJacking (Fullscreen page scroll) effect like Huge. https://www.hugeinc.com/ 1 Link to comment Share on other sites More sharing options...
Shaun Gorneau Posted August 20, 2020 Share Posted August 20, 2020 HI @Vineeth Achari, The example provided at hugeinc.com is pretty straight forward. At a basic level, you'll want to either kill the default scroll behavior, or contain everything in a parent element that has a height/width of 100% and overflow hidden. Then, whenever the scroll delta meets a minimum threshold, you can fire off a GSAP tween to move (tween the `y` property) of the stacked elements (each of those are also width/height 100% inside the container), -/+ the height of the a panel element. You'll want to detect if the user is at scrollTop 0 before allowing a tween +y to (reverse) ... and also determine if the scrollTop is at its limit ( panel height * (number of panels - 1 ) ) before allowing any advance (forward). Hope this helps. Shaun 3 Link to comment Share on other sites More sharing options...
PointC Posted August 20, 2020 Share Posted August 20, 2020 I have a thread with some sliders which may prove helpful. Happy tweening. 3 Link to comment Share on other sites More sharing options...
Vineeth Achari Posted August 21, 2020 Author Share Posted August 21, 2020 17 hours ago, Shaun Gorneau said: HI @Vineeth Achari, The example provided at hugeinc.com is pretty straight forward. At a basic level, you'll want to either kill the default scroll behavior, or contain everything in a parent element that has a height/width of 100% and overflow hidden. Then, whenever the scroll delta meets a minimum threshold, you can fire off a GSAP tween to move (tween the `y` property) of the stacked elements (each of those are also width/height 100% inside the container), -/+ the height of the a panel element. You'll want to detect if the user is at scrollTop 0 before allowing a tween +y to (reverse) ... and also determine if the scrollTop is at its limit ( panel height * (number of panels - 1 ) ) before allowing any advance (forward). Hope this helps. Shaun Thanks Shaun. 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