Easing Class
Module: cc
This class provide easing methods for Tween class.
Demonstratio: https://easings.net/
Index
Methods
quadInEasing in with quadratic formula.quadOutEasing out with quadratic formula.quadInOutEasing in and out with quadratic formula.cubicInEasing in with cubic formula.cubicOutEasing out with cubic formula.cubicInOutEasing in and out with cubic formula.quartInEasing in with quartic formula.quartOutEasing out with quartic formula.quartInOutEasing in and out with quartic formula.quintInEasing in with quintic formula.quintOutEasing out with quintic formula.quintInOutEasing in and out with quintic formula.sineInEasing in and out with sine formula.sineOutEasing in and out with sine formula.sineInOutEasing in and out with sine formula.expoInEasing in and out with exponential formula.expoOutEasing in and out with exponential formula.expoInOutEasing in and out with exponential formula.circInEasing in and out with circular formula.circOutEasing in and out with circular formula.circInOutEasing in and out with circular formula.elasticInEasing in action with a spring oscillating effect.elasticOutEasing out action with a spring oscillating effect.elasticInOutEasing in and out action with a spring oscillating effect.backInEasing in action with "back up" behavior.backOutEasing out action with "back up" behavior.backInOutEasing in and out action with "back up" behavior.bounceInEasing in action with bouncing effect.bounceOutEasing out action with bouncing effect.bounceInOutEasing in and out action with bouncing effect.smoothTarget will run action with smooth effect.fadeTarget will run action with fade effect.
Details
Methods
quadIn
Easing in with quadratic formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:52 |
Parameters
tNumber The current time as a percentage of the total time.
quadOut
Easing out with quadratic formula. From fast to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:60 |
Parameters
tNumber The current time as a percentage of the total time.
quadInOut
Easing in and out with quadratic formula. From slow to fast, then back to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:68 |
Parameters
tNumber The current time as a percentage of the total time.
cubicIn
Easing in with cubic formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:87 |
Parameters
tNumber The current time as a percentage of the total time.
cubicOut
Easing out with cubic formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:95 |
Parameters
tNumber The current time as a percentage of the total time.
cubicInOut
Easing in and out with cubic formula. From slow to fast, then back to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:103 |
Parameters
tNumber The current time as a percentage of the total time.
quartIn
Easing in with quartic formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:122 |
Parameters
tNumber The current time as a percentage of the total time.
quartOut
Easing out with quartic formula. From fast to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:130 |
Parameters
tNumber The current time as a percentage of the total time.
quartInOut
Easing in and out with quartic formula. From slow to fast, then back to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:138 |
Parameters
tNumber The current time as a percentage of the total time.
quintIn
Easing in with quintic formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:157 |
Parameters
tNumber The current time as a percentage of the total time.
quintOut
Easing out with quintic formula. From fast to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:165 |
Parameters
tNumber The current time as a percentage of the total time.
quintInOut
Easing in and out with quintic formula. From slow to fast, then back to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:173 |
Parameters
tNumber The current time as a percentage of the total time.
sineIn
Easing in and out with sine formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:192 |
Parameters
tNumber The current time as a percentage of the total time.
sineOut
Easing in and out with sine formula. From fast to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:200 |
Parameters
tNumber The current time as a percentage of the total time.
sineInOut
Easing in and out with sine formula. From slow to fast, then back to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:208 |
Parameters
tNumber The current time as a percentage of the total time.
expoIn
Easing in and out with exponential formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:222 |
Parameters
tNumber The current time as a percentage of the total time.
expoOut
Easing in and out with exponential formula. From fast to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:230 |
Parameters
tNumber The current time as a percentage of the total time.
expoInOut
Easing in and out with exponential formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:238 |
Parameters
tNumber The current time as a percentage of the total time, then back to slow.
circIn
Easing in and out with circular formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:263 |
Parameters
tNumber The current time as a percentage of the total time.
circOut
Easing in and out with circular formula. From fast to slow.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:271 |
Parameters
tNumber The current time as a percentage of the total time.
circInOut
Easing in and out with circular formula. From slow to fast.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:279 |
Parameters
tNumber The current time as a percentage of the total time, then back to slow.
elasticIn
Easing in action with a spring oscillating effect.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:299 |
Parameters
tNumber The current time as a percentage of the total time.
elasticOut
Easing out action with a spring oscillating effect.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:323 |
Parameters
tNumber The current time as a percentage of the total time.
elasticInOut
Easing in and out action with a spring oscillating effect.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:347 |
Parameters
tNumber The current time as a percentage of the total time.
backIn
Easing in action with "back up" behavior.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:381 |
Parameters
tNumber The current time as a percentage of the total time.
backOut
Easing out action with "back up" behavior.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:392 |
Parameters
tNumber The current time as a percentage of the total time.
backInOut
Easing in and out action with "back up" behavior.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:403 |
Parameters
tNumber The current time as a percentage of the total time.
bounceIn
Easing in action with bouncing effect.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:423 |
Parameters
tNumber The current time as a percentage of the total time.
bounceOut
Easing out action with bouncing effect.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:433 |
Parameters
tNumber The current time as a percentage of the total time.
bounceInOut
Easing in and out action with bouncing effect.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:454 |
Parameters
tNumber The current time as a percentage of the total time.
smooth
Target will run action with smooth effect.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:468 |
Parameters
tNumber The current time as a percentage of the total time.
fade
Target will run action with fade effect.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/animation/easing.js:486 |
Parameters
tNumber The current time as a percentage of the total time.