Skip to content

动画插值器

属性动画动画插值器分类

  • AccelerateDecelerateInterpolator
  • AccelerateInterpolator
  • AnticipateInterpolator
  • AnticipateOvershootInterpolator
  • BounceInterpolator
  • CycleInterpolator
  • DecelerateInterpolator
  • LinearInterpolator
  • OvershootInterpolator
  • FastOutLinearInInterpolator
  • FastOutSlowInInterpolator
  • PathInterpolator

属性动画动画插值器的值定义

点击查看源码
js
export const ES_ACCELERATE_DECELERATE_INTERPOLATOR = 1;
export const ES_ACCELERATE_INTERPOLATOR = 2;
export const ES_ANTICIPATE_INTERPOLATOR = 3;
export const ES_ANTICIPATE_OVERSHOOT_INTERPOLATOR = 4;
export const ES_BOUNCE_INTERPOLATOR = 5;
export const ES_CYCLE_INTERPOLATOR = 6;
export const ES_DECELERATE_INTERPOLATOR = 7;
export const ES_LINEAR_INTERPOLATOR = 8;
export const ES_OVERSHOOT_INTERPOLATOR = 9;
export const ES_FAST_OUT_LINEAR_IN_INTERPOLATOR = 10;
export const ES_FAST_OUT_SLOW_IN_INTERPOLATOR = 11;
export const ES_PATH_INTERPOLATOR = 12;

示例代码

点击查看源码
vue
this.$refs.animation_view.objectAnimator3(
          "AccelerateInterpolator",//自定义id
          ES_ANIMATION_VALUE_TYPE_FLOAT,
          ES_ANIMATION_PROPERTY_NAME_TRANSLATION_Y,
          "0",
          "500",
          '0',
          1500,
          -1,
          0,
          false,
          false,
          //插值器参数对象
          {
            type: ES_ACCELERATE_INTERPOLATOR,
          },
      );