Skip to content

Commit c2349e5

Browse files
authored
Merge pull request #6762 from SplinterSword/fixGsapAnimation
Added Fixes to useGsapTimeline.js to make animations smooth
2 parents 223ae98 + 0e797c3 commit c2349e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sections/Kanvas/FeaturesSection/useGsapTimeline.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ const useGsapTimeline = ({ trigger, featureContainerName,yPercent }) => {
2929
start: "top top+=96px",
3030
end: "bottom top",
3131
// markers: true,
32-
scrub: true,
32+
// Changed the value of scrub from true to 2 to make the animation smoother
33+
scrub: 2,
3334
pin: true,
34-
toggleActions: "play pause resume reset"
35+
// Changed the toggle actions to play complete reverse reset so that it correctly follows the scroll position
36+
toggleActions: "play complete reverse reset"
3537
},
3638
});
3739

0 commit comments

Comments
 (0)