React Native Easing怎么用

轨迹可视地址

具体动画轨迹参考 https://easings.net/#

Ease.out 和 Ease.in 是什么

  • Ease.in
    Animated.timing的默认值是Easing.in()
    例如:

    Animated.timing(
      this.animatedValue,
      {
        toValue: 1,
        duration: 1000,
        easing:Easing.cubic, // 加速运动,默认为 Easing.in(Easing.cubic)
      }
    )
    

    Ease.cubic可视图:https://easings.net/#easeInCubic

  • Ease.out
    Easing.in的运动轨迹反转

    Easing.out(Easing.cubic);  // 减速运动
    

其他

transform:[{scale:0}] does't work in Android, please use transform:[{scale:0.01}]

Reference

  • [1] 更多补完文档请参阅https://github.com/React-Sextant/react-native-bridge-docs

你可能感兴趣的:(React Native Easing怎么用)