Is there some way to create a function like Easing.HalfSin
in React Native?
Asked
Active
Viewed 69 times
0

Myzel394
- 1,155
- 3
- 16
- 40
1 Answers
0
Based on this answer we can create an approximate function using bezier
:
const EasingHalfSin = Easing.bezier(0.364212423249, 0, 0.635787576751, 1);
and then use it like any other easing function:
Animated.timing(position, {
toValue: 150,
duration: 1000,
useNativeDriver: true,
easing: EasingHalfSin,
}),

Myzel394
- 1,155
- 3
- 16
- 40