Files
cocos4/cocos/tween/export-api.ts
T
jiaxin.lai 1d14c0bc93 refactor_tween (#5794) (#5943)
* 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
2019-12-23 16:22:48 +08:00

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