fabric easings缓动函数

缓动效果

详见:
https://www.malaoshi.top/show_1IX8VMVXxuH9.html

fabric 缓动函数

默认值:easeInSine

详见:
http://fabricjs.com/docs/fabric.util.ease.html

例子

fabric.util.animate({
            startValue: 0,
            endValue: 1,
            duration: duration,
            onChange: (value) => { // 过程函数
              element.opacity = value;
              canvasFab.renderAll();
            },
            onComplete: () => { // 结束函数
              element.opacity = 1; // 完全不透明
            },
            // 设置缓动效果
            easing: fabric.util.ease.easeInBack
          })