antvis/G

[g] timing 对象上 easingFunction 类型报错

xiaoiver opened this issue · 1 comments

image

目前自定义缓动函数用法如下:
https://g.antv.antgroup.com/examples/animation/animation-basic/#easing

另外希望提供自定义函数注册方式

用法如下:

import { EasingFunctions } from '@antv/g';

EasingFunctions['my-easing'] = (t: number) => t;

circle.animate([{ opacity: 0 }, { opacity: 1 }], {
  duration: 500,
  easing: 'my-easing',
});