Skip to content

动画属性

动画属性类型:alpha

效果预览

animation_alpha.gif

动画属性类型:rotation

效果预览

animation_rotation.gif

动画属性类型:scale

效果预览

animation_scale.gif

动画属性类型:translation

效果预览

animation_translation.gif

动画属性类型的值定义

点击查看源码
js
export const ES_ANIMATION_PROPERTY_NAME_ALPHA = 'alpha'
export const ES_ANIMATION_PROPERTY_NAME_ROTATION = 'rotation'
export const ES_ANIMATION_PROPERTY_NAME_SCALE_X = 'scaleX'
export const ES_ANIMATION_PROPERTY_NAME_SCALE_Y = 'scaleY'
export const ES_ANIMATION_PROPERTY_NAME_TRANSLATION_X = 'translationX'
export const ES_ANIMATION_PROPERTY_NAME_TRANSLATION_Y = 'translationY'

示例代码

点击查看源码
vue
this.$refs.animation_view.objectAnimator5(
        "AnimationListener",//自定义id
        ES_ANIMATION_VALUE_TYPE_FLOAT,
        ES_ANIMATION_PROPERTY_NAME_TRANSLATION_X,//设置动画的类型为位移动画
        "0",
        "500",
        "0",
        "-500",
        "0",
        10000,
        -1,
        0,
        true,//listenAnimator
        true,//listenAnimatorValue
        null,
      );