使用GSAP动画Fabric js? [英] Animate Fabric js using GSAP?

查看:162
本文介绍了使用GSAP动画Fabric js?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在玩Fabric.js库一段时间。它是什么感觉很容易转换对象和更多。

I have been playing with the Fabric.js library for a little while. What like about it is the ease of transforming objects and a couple more.

我想知道是否有插件或任何方式使用GSAP动画Fabric元素?

I am wondering if there is a plugin or any way to animate Fabric elements using GSAP?

推荐答案

可以通过将结构对象传递到GSAP来完成

It can be done by passing the fabric objects into the GSAP

const tl = new TimelineLite();
tl.staggerFromTo(
   [fabricObject], 
   1, 
  {left: -config.width}, 
  {left: config.width, onUpdate: () => canvas.renderAll()}, 
  0.4);

这篇关于使用GSAP动画Fabric js?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆