react-native-animatable icon indicating copy to clipboard operation
react-native-animatable copied to clipboard

bounce animation inputRange/outputRange values

Open FuzzyTree opened this issue 10 years ago • 1 comments

I noticed the input range has a very small increase of 0.03 between 0.40 and 0.43 and that the corresponding output range of -30 doesn't change.

Is this necessary or can 0.43 and one of the -30 be removed?

bounce(duration) {
  return this.animate(duration, {
    transform: [{
      translateY: this.state.animationValue.interpolate({
        inputRange: [0, 0.2, 0.4, 0.43, 0.53, 0.7, 0.8, 0.9, 1],
        outputRange: [0, 0, -30, -30, 0, -15, 0, -4, 0],
      }),
    }],
  });
}

FuzzyTree avatar Aug 13 '16 02:08 FuzzyTree

The effect is a slight pause at -30, the animation would be different with it removed.

oblador avatar Aug 21 '16 15:08 oblador