40 lines
753 B
JavaScript
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
|