mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
1d14c0bc93
* refactor_tween (#5794) * copy from master branch cocos2d actions * tweaks & stash * tweaks * stash * stash * tweaks * fix repeatForever init * fix repeat、repeatForever、reverseTime * add elastic out in to easing * add typing * add adapter & checker; add api doc; * tweaks * fix tween number * tweaks * tweaks * remove tween.js * rename actions to tween * export Tween * allow mutiple remove action * using new api * remove deprecated from tween * add deprecated to tweenUtil * fix ci test
21 lines
903 B
TypeScript
21 lines
903 B
TypeScript
/**
|
|
* @category tween
|
|
*/
|
|
|
|
export type TweenEasing =
|
|
'linear' | 'smooth' | 'fade' |
|
|
'quadIn' | 'quadOut' | 'quadInOut' | 'quadOutIn' |
|
|
'cubicIn' | 'cubicOut' | 'cubicInOut' | 'cubicOutIn' |
|
|
'quartIn' | 'quartOut' | 'quartInOut' | 'quartOutIn' |
|
|
'quintIn' | 'quintOut' | 'quintInOut' | 'quintOutIn' |
|
|
'sineIn' | 'sineOut' | 'sineInOut' | 'sineOutIn' |
|
|
'expoIn' | 'expoOut' | 'expoInOut' | 'expoOutIn' |
|
|
'circIn' | 'circOut' | 'circInOut' | 'circOutIn' |
|
|
'elasticIn' | 'elasticOut' | 'elasticInOut' | 'elasticOutIn' |
|
|
'backIn' | 'backOut' | 'backInOut' | 'backOutIn' |
|
|
'bounceIn' | 'bounceOut' | 'bounceInOut' | 'bounceOutIn' ;
|
|
|
|
export interface ITweenOption {
|
|
easing?: TweenEasing | ((k: number) => number);
|
|
progress?: (start: number, end: number, current: number, ratio: number) => number;
|
|
} |