CocosCreator之缓动函数类 Easing

 官方文档:使用缓动系统 · Cocos Creator

效果图地址:https://easings.net/

/** !#en
	This class provide easing methods for {{#crossLink "tween"}}{{/crossLink}} class.<br>
	Demonstratio: https://easings.net/
	!#zh
	缓动函数类,为 {{#crossLink "Tween"}}{{/crossLink}} 提供缓动效果函数。<br>
	函数效果演示: https://easings.net/ */
	export class Easing {		
		/**
		!#en Easing in with quadratic formula. From slow to fast.
		!#zh 平方曲线缓入函数。运动由慢到快。
		@param t The current time as a percentage of the total time. 
		*/
		quadIn(t: number): number;		
		/**
		!#en Easing out with quadratic formula. From fast to slow.
		!#zh 平方曲线缓出函数。运动由快到慢。
		@param t The current time as a percentage of the total time. 
		*/
		quadOut(t: number): number;		
		/**
		!#en Easing in and out with quadratic formula. From slow to fast, then back to slow.
		!#zh 平方曲线缓入缓出函数。运动由慢到快再到慢。
		@param t The current time as a percentage of the total time. 
		*/
		quadInOut(t: number): number;		
		/**
		!#en Easing in with cubic formula. From slow to fast.
		!#zh 立方曲线缓入函数。运动由慢到快。
		@param t The current time as a percentage of the total time. 
		*/
		cubicIn(t: number): number;		
		/**
		!#en Easing out with cubic formula. From slow to fast.
		!#zh 立方曲线缓出函数。运动由快到慢。
		@param t The current time as a percentage of the total time. 
		*/
		cubicOut(t: number): number;		
		/**
		!#en Easing in and out with cubic formula. From slow to fast, then back to slow.
		!#zh 立方曲线缓入缓出函数。运动由慢到快再到慢。
		@param t The current time as a percentage of the total time. 
		*/
		cubicInOut(t: number): number;		
		/**
		!#en Easing in with quartic formula. From slow to fast.
		!#zh 四次方曲线缓入函数。运动由慢到快。
		@param t The current time as a percentage of the total time. 
		*/
		quartIn(t: number): number;		
		/**
		!#en Easing out with quartic formula. From fast to slow.
		!#zh 四次方曲线缓出函数。运动由快到慢。
		@param t The current time as a percentage of the total time. 
		*/
		quartOut(t: number): number;		
		/**
		!#en Easing in and out with quartic formula. From slow to fast, then back to slow.
		!#zh 四次方曲线缓入缓出函数。运动由慢到快再到慢。
		@param t The current time as a percentage of the total time. 
		*/
		quartInOut(t: number): number;		
		/**
		!#en Easing in with quintic formula. From slow to fast.
		!#zh 五次方曲线缓入函数。运动由慢到快。
		@param t The current time as a percentage of the total time. 
		*/
		quintIn(t: number): number;		
		/**
		!#en Easing out with quintic formula. From fast to slow.
		!#zh 五次方曲线缓出函数。运动由快到慢。
		@param t The current time as a percentage of the total time. 
		*/
		quintOut(t: number): number;		
		/**
		!#en Easing in and out with quintic formula. From slow to fast, then back to slow.
		!#zh 五次方曲线缓入缓出函数。运动由慢到快再到慢。
		@param t The current time as a percentage of the total time. 
		*/
		quintInOut(t: number): number;		
		/**
		!#en Easing in and out with sine formula. From slow to fast.
		!#zh 正弦曲线缓入函数。运动由慢到快。
		@param t The current time as a percentage of the total time. 
		*/
		sineIn(t: number): number;		
		/**
		!#en Easing in and out with sine formula. From fast to slow.
		!#zh 正弦曲线缓出函数。运动由快到慢。
		@param t The current time as a percentage of the total time. 
		*/
		sineOut(t: number): number;		
		/**
		!#en Easing in and out with sine formula. From slow to fast, then back to slow.
		!#zh 正弦曲线缓入缓出函数。运动由慢到快再到慢。
		@param t The current time as a percentage of the total time. 
		*/
		sineInOut(t: number): number;		
		/**
		!#en Easing in and out with exponential formula. From slow to fast.
		!#zh 指数曲线缓入函数。运动由慢到快。
		@param t The current time as a percentage of the total time. 
		*/
		expoIn(t: number): number;		
		/**
		!#en Easing in and out with exponential formula. From fast to slow.
		!#zh 指数曲线缓出函数。运动由快到慢。
		@param t The current time as a percentage of the total time. 
		*/
		expoOut(t: number): number;		
		/**
		!#en Easing in and out with exponential formula. From slow to fast.
		!#zh 指数曲线缓入和缓出函数。运动由慢到很快再到慢。
		@param t The current time as a percentage of the total time, then back to slow. 
		*/
		expoInOut(t: number): number;		
		/**
		!#en Easing in and out with circular formula. From slow to fast.
		!#zh 循环公式缓入函数。运动由慢到快。
		@param t The current time as a percentage of the total time. 
		*/
		circIn(t: number): number;		
		/**
		!#en Easing in and out with circular formula. From fast to slow.
		!#zh 循环公式缓出函数。运动由快到慢。
		@param t The current time as a percentage of the total time. 
		*/
		circOut(t: number): number;		
		/**
		!#en Easing in and out with circular formula. From slow to fast.
		!#zh 指数曲线缓入缓出函数。运动由慢到很快再到慢。
		@param t The current time as a percentage of the total time, then back to slow. 
		*/
		circInOut(t: number): number;		
		/**
		!#en Easing in action with a spring oscillating effect.
		!#zh 弹簧回震效果的缓入函数。
		@param t The current time as a percentage of the total time. 
		*/
		elasticIn(t: number): number;		
		/**
		!#en Easing out action with a spring oscillating effect.
		!#zh 弹簧回震效果的缓出函数。
		@param t The current time as a percentage of the total time. 
		*/
		elasticOut(t: number): number;		
		/**
		!#en Easing in and out action with a spring oscillating effect.
		!#zh 弹簧回震效果的缓入缓出函数。
		@param t The current time as a percentage of the total time. 
		*/
		elasticInOut(t: number): number;		
		/**
		!#en Easing in action with "back up" behavior.
		!#zh 回退效果的缓入函数。
		@param t The current time as a percentage of the total time. 
		*/
		backIn(t: number): number;		
		/**
		!#en Easing out action with "back up" behavior.
		!#zh 回退效果的缓出函数。
		@param t The current time as a percentage of the total time. 
		*/
		backOut(t: number): number;		
		/**
		!#en Easing in and out action with "back up" behavior.
		!#zh 回退效果的缓入缓出函数。
		@param t The current time as a percentage of the total time. 
		*/
		backInOut(t: number): number;		
		/**
		!#en Easing in action with bouncing effect.
		!#zh 弹跳效果的缓入函数。
		@param t The current time as a percentage of the total time. 
		*/
		bounceIn(t: number): number;		
		/**
		!#en Easing out action with bouncing effect.
		!#zh 弹跳效果的缓出函数。
		@param t The current time as a percentage of the total time. 
		*/
		bounceOut(t: number): number;		
		/**
		!#en Easing in and out action with bouncing effect.
		!#zh 弹跳效果的缓入缓出函数。
		@param t The current time as a percentage of the total time. 
		*/
		bounceInOut(t: number): number;		
		/**
		!#en Target will run action with smooth effect.
		!#zh 平滑效果函数。
		@param t The current time as a percentage of the total time. 
		*/
		smooth(t: number): number;		
		/**
		!#en Target will run action with fade effect.
		!#zh 渐褪效果函数。
		@param t The current time as a percentage of the total time. 
		*/
		fade(t: number): number;	
	}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值