Class Index | File Index

Classes


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.

Class Summary
Constructor Attributes Constructor Name and Description
 
Construct a poly animation engine.
Method Summary
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.
 
Set the null origin derivative property.
 
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
Class Detail
zwt.animation.PolyEngine()
Construct a poly animation engine.
Author: Jeremy KUHN.
Method Detail
{Integer[][]} getConstants()
Return the constants.
Returns:
The constants of the polynomial function

{Boolean} isNullOriginDerivative()
Return true if the derivative at the origin is null.
Returns:
true or false

{Boolean} isNullTargetDerivative()
Return true if the derivative at the target duration is null.
Returns:
true or false

{Boolean} isOriginBouncing()
Return true if the origin bouncing property is set.
Returns:
true or false

{Boolean} isTargetBouncing()
Return true if the target bouncing property is set.
Returns:
true or false

setConstants(array_constants)
Set the constants for this engine. Constants are the initial conditions used to determine the degree of the polynomial to use.

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)

setNullOriginDerivative(boolean_flag)
Set the null origin derivative property.

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

setNullTargetDerivative(boolean_flag)
Set the null target derivative property.

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

setOriginBouncing(boolean_bouncing)
Set the origin bouncing property.

If set to true, object will bounce at the beginning of the animation.

Parameters:
boolean_bouncing
true or false

setTargetBouncing(boolean_bouncing)
Set the target bouncing property.

If set to true, object will bounce at the end of the animation.

Parameters:
boolean_bouncing
true or false

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Nov 09 2011 19:29:07 GMT+0100 (CET)