Class zwt.animation.PolyEngine
Extends
zwt.animation.Engine.
The poly engine is an implementation of zwt.animation.Engine that generates values based on a polynomial function.
It is possible to define initial conditions to fully described the expected movement of the resulting animation.
Defined in: PolyEngine.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Construct a poly animation engine.
|
Method Attributes | Method Name and Description |
---|---|
Return the constants.
|
|
Return true if the derivative at the origin is null.
|
|
Return true if the derivative at the target duration is null.
|
|
Return true if the origin bouncing property is set.
|
|
Return true if the target bouncing property is set.
|
|
setConstants(array_constants)
Set the constants for this engine.
|
|
setNullOriginDerivative(boolean_flag)
Set the null origin derivative property.
|
|
setNullTargetDerivative(boolean_flag)
Set the null target derivative property.
|
|
setOriginBouncing(boolean_bouncing)
Set the origin bouncing property.
|
|
setTargetBouncing(boolean_bouncing)
Set the target bouncing property.
|
- Methods borrowed from class zwt.animation.Engine:
- getStepValue, getTargetValue, setTargetValue
- Returns:
- The constants of the polynomial function
- Returns:
- true or false
- Returns:
- true or false
- Returns:
- true or false
- Returns:
- true or false
They represents an array of points with x as a percentage of completion from 0 to 100 and y as a percentage of the target value from 0 to 100).
- Parameters:
- {Integer[][]} array_constants
- an array of points ( (x,y) where x is the percentage of completion and y the percentage of the target value)
If set to true, the derivative of the polynomial is considered to be null at the origin (the speed of the animation is 0 at the beginning of the animation).
- Parameters:
- boolean_flag
- true or false
If set to true, the derivative of the polynomial is considered to be null at the target duration (the speed of the animation is 0 at the end of the animation).
- Parameters:
- boolean_flag
If set to true, object will bounce at the beginning of the animation.
- Parameters:
- boolean_bouncing
- true or false
If set to true, object will bounce at the end of the animation.
- Parameters:
- boolean_bouncing
- true or false