Created
May 6, 2019 10:20
-
-
Save tarun-dugar/cd5ea1138a49de63cfe0563cf77cc1d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smoothScroll({ | |
scrollElement: window, | |
scrollAmount: 300, | |
cubicBezierPoints: { | |
x1: 0.2, | |
x2: 0.5, | |
y1: 0.5, | |
y2: 0.9 | |
}, | |
onRefUpdateCallback: (animationInstance) => { | |
// cancelAnimationFrame(animationInstance); | |
}, | |
onAnimationCompleteCallback: () => { | |
console.log('animation complete!'); | |
}, | |
duration: 2000, | |
direction: 'right' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment