src/views/CardStack/CardStackStyleInterpolator.js
function forFade(props) {
  const { layout, position, scene } = props;

  if (!layout.isMeasured) {
    return forInitial(props);
  }
  const interpolate = getSceneIndicesForInterpolationInputRange(props);

  if (!interpolate) return { opacity: 0 };

  const { first, last } = interpolate;
  const index = scene.index;
  const opacity = position.interpolate({
    inputRange: [first, index, last],
    outputRange: [0, 1, 1],
  });

  return {
    opacity,
  };
}
function forFade(props) {
  const { layout, position, scene } = props;

  if (!layout.isMeasured) {
    return forInitial(props);
  }
  const interpolate = getSceneIndicesForInterpolationInputRange(props);

  if (!interpolate) return { opacity: 0 };

  const { first, last } = interpolate;
  const index = scene.index;
  const opacity = position.interpolate({
    inputRange: [first, index, last],
    outputRange: [0, 1, 1],
  });

  return {
    opacity,
  };
}
function forFade ( props ) { const { layout , position , scene } = props ; if ( ! layout . isMeasured ) { return forInitial ( props ) ; } const interpolate = getSceneIndicesForInterpolationInputRange ( props ) ; if ( ! interpolate ) return { opacity : 0 } ; const { first , last } = interpolate ; const index = scene . index ; const opacity = position . interpolate ( { inputRange : [ first , index , last ] , outputRange : [ 0 , 1 , 1 ] , } ) ; return { opacity , } ; }
fadeIn and fadeOut
fadeIn and fadeOut