Open SethHamilton opened 6 years ago
Easing option was removed in v0.4.0
and set to linear:
https://github.com/kyo504/react-native-marquee/blob/49db5bfef3cf0880e9f29f34b8fdb99ba937f4b2/index.tsx#L61
Could easing option please be added again? Linear looks a bit cheap...
Easing InOut still missing in v0.5.0, @kyo504 any plans to bring it back or add a parameter to choose easing?
I am using the following package-patch for now:
diff --git a/node_modules/react-native-marquee/src/index.tsx b/node_modules/react-native-marquee/src/index.tsx
index 8c86195..e8379a3 100644
--- a/node_modules/react-native-marquee/src/index.tsx
+++ b/node_modules/react-native-marquee/src/index.tsx
@@ -68,7 +68,7 @@ const createAnimation = (
},
): Animated.CompositeAnimation => {
const baseAnimation = Animated.timing(animatedValue, {
- easing: Easing.linear,
+ easing: Easing.inOut(Easing.ease),
useNativeDriver: true,
...config,
});
@@ -85,7 +85,7 @@ const createAnimation = (
useNativeDriver: true,
}),
Animated.timing(animatedValue, {
- easing: Easing.linear,
+ easing: Easing.inOut(Easing.ease),
useNativeDriver: true,
...config,
duration: consecutive.duration,
It would appear that the easing options that go in reverse (inOut or back) result in an exception.