libGDX之Interpolation类学习笔记

动作函数通常是这样的Actions.moveTo(x, y, duration),但这都是匀速运动,如果想实现“先快后慢”等功能,就要用Actions.moveTo(x, y, duration, interpolation)。

libGDX提供的Interpolation及其图像如下:


注:所有图像均遵循  x属于[0,1],对于范围外的图像请无视。

有两种颜色的图像是两个函数拼在一起,x区间分别是[0,0.5],(0.5,1],比如下图是[0,0.5]区间的绿色图像+(0.5,1]区间的红色图像;

Interpolation.circle;

 

Interpolation.circleIn;

 

Interpolation.circleOut;

 

 

Interpolation.fade;

 

Interpolation.linear;

 

Interpolation.pow2InInverse;

 

Interpolation.pow2OutInverse;

 

Interpolation.pow3InInverse;


通过以上图像发现,变量名中有In的,将图像旋转180度可以得到Out的图像。比如将Interpolation.pow3InInverse图像翻转180度可以得到Interpolation.pow2OutInverse的图像,接下来有Out的图像就不画了。


Interpolation.sine;

 

Interpolation.sineIn;



Interpolation.bounce;

这个逻辑比较复杂,没看懂。



Interpolation.elastic;

 

Interpolation.exp10;

 


Interpolation.exp5;



Interpolation.pow2;


 

Interpolation.pow3;

 

Interpolation.pow4;

 

Interpolation.pow5;


 

Interpolation.swing;




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值