Closed harterc1 closed 4 years ago
Hi @harterc1,
I already take velocity into account to determine what the next snap point should be, but having a Easing.Linear
function probably wasn't the best default of choice since it doesn't feel very natural.
I agree that adding the possibility of having a spring
animation driver could come in handy for extending the animations range. Will take a look soon.
In the meantime, you can configure the animation by providing a duration and/or a different easing function, via animationConfig
. Have you tried that?
For example, to simulate a spring animation, you could use:
animationConfig: {
easing: Easing.out(Easing.elastic(bounciness))
}
I've created a PR for this! https://github.com/rgommezz/react-native-scroll-bottom-sheet/pull/36
You should consider using
react-native-reanimated
spring
instead oftiming
.https://software-mansion.github.io/react-native-reanimated/spring.html
You can use the gesture's velocity as a starting velocity so that the bottomsheet snaps to a snap point at a natural speed & momentum -- better user experience.