Class AnimeJLinearInterpolator
Object
|
+--AnimeJLinearInterpolator
- class
AnimeJLinearInterpolator
Generalized linear interpolator used to interpolate
the argument of a function or an object property like a style.
The interpolation is linear but it is possible to specify an array of
linear segments unevenly distributed in the interval [0.0, 1.0] which
is the range of time (normalized). For instance the following is a way to
distribute interpolation for a value from 0 to 1000 in a way that the first
half the value changes linearly in the interval 0-50 and in the second half
in the interval 50-1000:
[ { t: 0.0, v: 0 }, { t: 0.5, v: 50 }, { t: 1.0, v: 1000 } ]
Defined in AnimeJ.js
See:
Constructor Summary |
AnimeJLinearInterpolator(<Object> obj, <String> prop, <Array> steps, <Function> conv, <String> prefix, <String> suffix)
|
Conversion
Object Conversion
Obj
Object Obj
Prefix
Object Prefix
Prop
Object Prop
Steps
Object Steps
Suffix
Object Suffix
AnimeJLinearInterpolator
AnimeJLinearInterpolator(<Object> obj, <String> prop, <Array> steps, <Function> conv, <String> prefix, <String> suffix)
Parameters:
obj
- Either an object (like a style of a DOM node) or a function with a single parameter which gets invoked for each change of the value.
prop
- The property name to be changed, it is considered only in case the obj parameter refers to an object.
steps
- Array of pairs { t: t, v: v } ORDERED by the field t. The t field is a time value and should be in the interval [0.0, 1.0] and the first and the last values for t MUST be 0.0 and 1.0 respectively. The field v defines the value that should be set when time reaches the given value. Interpolation of values is performed
conv
- Conversion function to interpolate two values given a time value in the range [0.0, 1.0] like those defined in AnimeJConv
prefix
- Prefix string for the output value.
suffix
- Suffix string for the output value (for instance 'px').
Compute
void Compute(v)
Documentation generated by
JSDoc on Sat Nov 29 22:32:19 2008