improve the animations for image and text

This commit is contained in:
Pablo Velez Vidal 2022-10-29 00:12:41 +02:00
parent 9f4207ddcf
commit 90cac692b4

View file

@ -59,17 +59,17 @@ const SlideItem = ({theme, item, scrollX, index}: Props) => {
const translateImage = scrollX.interpolate({
inputRange,
outputRange: [width * 0.7, 1, -width * 0.7],
outputRange: [width * 2, 0, -width * 2],
});
const translateTitle = scrollX.interpolate({
inputRange,
outputRange: [width * 0.5, 1, -width * 0.5],
outputRange: [width * 0.6, 0, -width * 0.6],
});
const translateDescription = scrollX.interpolate({
inputRange,
outputRange: [width * 0.3, 1, -width * 0.3],
outputRange: [width * 0.2, 0, -width * 0.2],
});
return (