简体   繁体   English

如何将Greensock集成到pixi js中

[英]how to integrate the Greensock into pixi js

Pixi's is an extremely fast 2D sprite rendering engine and Greensock is an animation javascript library. Pixi是一个非常快速的2D精灵渲染引擎,而Greensock是一个动画javascript库。

Has anyone used this before? 有人使用过吗? If so would it integrate with GreenSock? 如果是这样,它将与GreenSock集成吗?

There a library available for integrating gsap into pixi. 有一个可用于将gsap集成到pixi中。

var sprite = new PIXI.Sprite(texture);
TweenLite.set(sprite, { pixi: {
  //set property
}});
TweenLite.to(sprite);

Actually, there's an official plugin from GSAP that makes it much easier to work with Pixi: https://greensock.com/docs/Plugins/PixiPlugin 实际上,有一个来自GSAP的官方插件,可以更轻松地使用Pixi: https//greensock.com/docs/Plugins/PixiPlugin

There are some demos in the docs. 文档中有一些演示。 And yes, lots of people use GSAP with Pixi. 是的,很多人在Pixi中使用GSAP。

I wouldn't really recommend that other (unofficial) plugin that was mentioned in the previous post because it doesn't handle overwriting quite right, and it's not as full-featured. 我不会真的推荐上一篇文章中提到的其他(非官方)插件,因为它不能正确地处理覆盖,而且功能不那么完善。

Happy tweening! 补间快乐!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM