amis-rpc-design/node_modules/@react-navigation/bottom-tabs/lib/module/TransitionConfigs/SceneStyleInterpolators.js
2023-10-07 19:42:30 +08:00

40 lines
753 B
JavaScript

/**
* Simple cross fade animation
*/
export function forCrossFade(_ref) {
let {
current
} = _ref;
return {
sceneStyle: {
opacity: current.interpolate({
inputRange: [-1, 0, 1],
outputRange: [0, 1, 0]
})
}
};
}
/**
* Animation where the screens slightly shift to left/right
*/
export function forShifting(_ref2) {
let {
current
} = _ref2;
return {
sceneStyle: {
opacity: current.interpolate({
inputRange: [-1, 0, 1],
outputRange: [0, 1, 0]
}),
transform: [{
translateX: current.interpolate({
inputRange: [-1, 0, 1],
outputRange: [-50, 1, 50]
})
}]
}
};
}
//# sourceMappingURL=SceneStyleInterpolators.js.map