Tween
Class for creating a tweening animation
Static Method Summary
Static Public Methods | ||
public static |
easeInBack(t: *, b: *, c: *, d: *): * |
|
public static |
easeInBounce(t: *, b: *, c: *, d: *): * |
|
public static |
easeInCirc(t: *, b: *, c: *, d: *): * |
|
public static |
easeInCubic(t: *, b: *, c: *, d: *): * |
|
public static |
easeInElastic(t: *, b: *, c: *, d: *): * |
|
public static |
easeInExpo(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutBack(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutBounce(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutCirc(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutCubic(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutElastic(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutExpo(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutQuad(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutQuart(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutQuint(t: *, b: *, c: *, d: *): * |
|
public static |
easeInOutSine(t: *, b: *, c: *, d: *): * |
|
public static |
easeInQuad(t: *, b: *, c: *, d: *): * |
|
public static |
easeInQuart(t: *, b: *, c: *, d: *): * |
|
public static |
easeInQuint(t: *, b: *, c: *, d: *): * |
|
public static |
easeInSine(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutBack(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutBounce(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutCirc(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutCubic(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutElastic(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutExpo(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutQuad(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutQuart(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutQuint(t: *, b: *, c: *, d: *): * |
|
public static |
easeOutSine(t: *, b: *, c: *, d: *): * |
|
public static |
linear(t: *, b: *, c: *, d: *): * |
Static Private Methods | ||
private static |
|
|
private static |
Converts an Hex color value to an array of [r, g, b]. |
|
private static |
Converts an array of [r, g, b] to an Hex color code. |
Constructor Summary
Public Constructor | ||
public |
constructor(pOtions: Object) |
Member Summary
Public Members | ||
public |
Update each frame. |
|
public |
duration: * |
|
public |
easing: * |
|
public |
|
|
public |
end: * |
|
public |
events: {} |
|
public |
exportedValues: {} |
|
public |
|
|
public |
oscillating: * |
|
public |
|
|
public |
start: * |
|
public |
|
|
public |
update: * |
|
public |
version: * The version of the module. |
Method Summary
Public Methods | ||
public |
Animates the tween by oscillating between the start and end properties. |
|
public |
|
|
public |
Attaches a callback to the specified event. |
|
public |
Pauses the tween animation |
|
public |
Resumes the tween animation |
|
public |
stop() Stops the tween and clears all data. |
Private Methods | ||
private |
Builds/Rebuilds the tween object with new info |
Static Public Methods
public static easeInBack(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInBounce(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInCirc(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInCubic(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInElastic(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInExpo(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutBack(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutBounce(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutCirc(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutCubic(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutElastic(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutExpo(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutQuad(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutQuart(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutQuint(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInOutSine(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInQuad(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInQuart(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInQuint(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeInSine(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutBack(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutBounce(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutCirc(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutCubic(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutElastic(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutExpo(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutQuad(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutQuart(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutQuint(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static easeOutSine(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
public static linear(t: *, b: *, c: *, d: *): * source
Params:
Name | Type | Attribute | Description |
t | * | ||
b | * | ||
c | * | ||
d | * |
Return:
* |
Static Private Methods
Public Constructors
public constructor(pOtions: Object) source
Params:
Name | Type | Attribute | Description |
pOtions | Object |
|
The options for the tween animation |
pOtions.start | Object |
|
The starting properties of the animation |
pOtions.end | Object |
|
The end properties of the animation |
pOtions.duration | number |
|
The duration of the animation in milliseconds |
pOtions.easing | string |
|
The easing function to use for the animation |
Public Members
public duration: * source
public easing: * source
public end: * source
public events: {} source
public exportedValues: {} source
public oscillating: * source
public start: * source
public update: * source
Public Methods
public animate(pUpdate: function, pOscillate: boolean): Tween source
Animates the tween by oscillating between the start and end properties.
public build(pOtions: Object): * source
Params:
Name | Type | Attribute | Description |
pOtions | Object |
|
The options for the tween animation |
pOtions.start | Object |
|
The starting properties of the animation |
pOtions.end | Object |
|
The end properties of the animation |
pOtions.duration | number |
|
The duration of the animation in milliseconds |
pOtions.easing | string |
|
The easing function to use for the animation |
Return:
* |
public on(pEvent: Object, pCallback: Function): Tween source
Attaches a callback to the specified event.