Animate Fabric js using GSAP?

不想你离开。 提交于 2019-12-23 04:54:25

问题


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.

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


回答1:


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);


来源:https://stackoverflow.com/questions/46324061/animate-fabric-js-using-gsap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!