Constructor
new Tween()
Member
progress :Number
update :Handler
Update the callback, the value of the callback change when the change of the slow value occurs
Methods
clear()
Stop and clear current slow motion.
clear(tween)
Clean up a slow motion.
Parameters:
Name | Type | Description |
---|---|---|
tween |
Tween
|
Slow moving object. |
clearAll(target)
Clear all slow motion on the specified target object.
Parameters:
Name | Type | Description |
---|---|---|
target |
Object
|
Target object. |
complete()
Finish the move immediately and end up.
from(target, props, duration, easeopt, completeopt, delayopt, coverBefore, autoRecover) → {Tween}
From the props property, move to the current state.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
target |
Object
|
Target object (object that is about to change property values). | ||
props |
Object
|
A list of properties that change, such as {x:100, y:20, ease:Ease.backOut, complete:Handler.create (this, onComplete), update:new, Handler (this, onComplete)}. | ||
duration |
int
|
The amount of time spent in units per millisecond. | ||
ease |
function
|
<optional> |
null | ease The slow motion type defaults to uniform motion. |
complete |
Handler
|
<optional> |
null | complete End callback function. |
delay |
int
|
<optional> |
0 | delay Delayed execution time. |
coverBefore |
Boolean
|
Does it cover the slow motion before?. | ||
autoRecover |
Boolean
|
Automatically reclaims, defaults to true, and automatically reclaims to the object pool after the end of the action. |
from(target, props, duration, easeopt, completeopt, delayopt, coverBefore) → {Tween}
From the props property, move to the current state.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
target |
Object
|
Target object (object that is about to change property values). | ||
props |
Object
|
A list of properties that change, such as {x:100, y:20, ease:Ease.backOut, complete:Handler.create (this, onComplete), update:new, Handler (this, onComplete)}. | ||
duration |
int
|
The amount of time spent in units per millisecond. | ||
ease |
function
|
<optional> |
null | ease The slow motion type defaults to uniform motion. |
complete |
Handler
|
<optional> |
null | complete End callback function. |
delay |
int
|
<optional> |
0 | delay Delayed execution time. |
coverBefore |
Boolean
|
Does it cover the slow motion before?. |
pause()
Pause or slow motion can be restarted by resume or restart.
recover()
Recycle to object pool.
restart()
Restart the pause.
resume()
Resume a pause slow motion.
setStartTime(startTime)
Set start time.
Parameters:
Name | Type | Description |
---|---|---|
startTime |
Number
|
Start time. |
to(target, props, duration, easeopt, completeopt, delayopt, coverBefore) → {Tween}
The props property of the moving object to the target value.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
target |
Object
|
Target object (object that is about to change property values). | ||
props |
Object
|
A list of properties that change, such as {x:100, y:20, ease:Ease.backOut, complete:Handler.create (this, onComplete), update:new, Handler (this, onComplete)}. | ||
duration |
int
|
The amount of time spent in units per millisecond. | ||
ease |
function
|
<optional> |
null | ease The slow motion type defaults to uniform motion. |
complete |
Handler
|
<optional> |
null | complete End callback function. |
delay |
int
|
<optional> |
0 | delay Delayed execution time. |
coverBefore |
Boolean
|
Does it cover the slow motion before?. |
to(target, props, duration, easeopt, completeopt, delayopt, coverBefore, autoRecover) → {Tween}
The props property of the moving object to the target value.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
target |
Object
|
Target object (object that is about to change property values). | ||
props |
Object
|
A list of properties that change, such as {x:100, y:20, ease:Ease.backOut, complete:Handler.create (this, onComplete), update:new, Handler (this, onComplete)}. | ||
duration |
int
|
The amount of time spent in units per millisecond. | ||
ease |
function
|
<optional> |
null | ease The slow motion type defaults to uniform motion. |
complete |
Handler
|
<optional> |
null | complete End callback function. |
delay |
int
|
<optional> |
0 | delay Delayed execution time. |
coverBefore |
Boolean
|
Does it cover the slow motion before?. | ||
autoRecover |
Boolean
|
Automatically reclaims, defaults to true, and automatically reclaims to the object pool after the end of the action. |