KeyFrame class

KeyFrame class

A key frame is mainly defined by a time and a value, for some interpolation types, tangent/tension/bias/continuity is also used by calculating the final sampled value. Sampled values in a non-key-frame time position is interpolated by key-frames between the previous and next key-frames Value before/after the first/last key-frame are calculated by the Extrapolation class.

The KeyFrame type exposes the following members:

Constructors

ConstructorDescription
initCreate a new key frame on specified curve

Properties

PropertyDescription
timeGets or sets the time position of list.data[index] key frame, measured in seconds.
valueGets or sets the key-frame’s value.
interpolationGets or sets the key’s interpolation type, list.data[index] defines the algorithm how the sampled value is calculated.
tangent_weight_modeGets or sets the key’s tangent weight mode.
The out tangent or the next in tangent can be customized by select correct WeightedMode
step_modeGets or sets the key’s step mode.
If the interpolation type is Interpolation.CONSTANT, list.data[index] decides which key-frame’s value will be used during interpolation.
A StepMode.PREVIOUS_VALUE means the left key-frame’s value will be used
A StepMode.NEXT_VALUE means the next right key-frame’s value will be used
next_in_tangentGets or sets the next in(left) tangent on this key frame.
out_tangentGets or sets the out(right) tangent on this key frame.
out_weightGets or sets the out(right) weight on this key frame.
next_in_weightGets or sets the next in(left) weight on this key frame.
tensionGets or sets tension used in TCB spline
continuityGets or sets the continuity used in TCB spline
biasGets or sets the bias used in TCB spline
independent_tangentGets or sets the out and next in tangents are independent.
flatGet or set if the key frame is flat.
Key frame should be flat if next or previous key frame has the same value.
Flat key frame has flat tangents and fixed interpolation.
time_independent_tangentGets or sets the tangent is time-independent

See Also