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

47 lines
891 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.forCrossFade = forCrossFade;
exports.forShifting = forShifting;
/**
* Simple cross fade animation
*/
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
*/
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