动画的不同翻译列表

List of different translations for Animated

我正在学习动画。在文档中,我看到了 translateYtranslateX 并学习了它们。我阅读了整个文档,但没有找到任何其他翻译。我期待像 translateColor 之类的东西。

例如:

style={{
    opacity: this.state.fadeAnim, // Binds directly
    transform: [{
      translateBackgroundcolor: this.state.fadeAnim.interpolate({
        inputRange: [0, 1],
        outputRange: ['rgba(255, 0, 0, 1)', 'rgba(0, 255, 0, 1)'] 
      }),
    }],
  }}

购买我已经知道我需要这样做才能更改背景:

 var interpolatedColorAnimation = this._animatedValue.interpolate({
        inputRange: [0, 100],
      outputRange: ['rgba(255,255,255, 1)', 'rgba(51,156,177, 1)']
    });

    return (
      <View style={styles.container}>
       <Animated.View 
              style={[styles.box, {backgroundColor: interpolatedColorAnimation}]}
          />
      </View>
    );

但我不知道 transform 内部应该更改什么以及应该作为样式传递什么 属性。

在哪里可以找到它们的列表?他们为什么不在 react native doc 中?

这是您要找的吗?

https://facebook.github.io/react-native/docs/transforms.html

看起来好像变换不支持动画颜色