t3d. KeyframeInterpolant

Interpolant serves as the base class for all interpolation algorithms. It defines a set of static methods that are intended to be invoked by a keyframe track for the purpose of interpolation.

Constructor

(abstract) new KeyframeInterpolant()

Methods

(static) copyValue(index, outBuffer) → {Array}

Copy the value for the specified index.
Parameters:
NameTypeDescription
indexNumberthe index of the keyframe.
outBufferArraythe output buffer to store the copied value.
Returns:
- the output buffer to store the copied value.
Type: 
Array

(static) getValueSize() → {Number}

Get the value size for keyframe values.
Returns:
- the value size.
Type: 
Number

(static) interpolate(index0, ratio, duration, outBuffer) → {Array}

Interpolate the value for the specified time.
Parameters:
NameTypeDescription
index0Numberthe index of the first keyframe.
ratioNumberthe ratio (0-1) of the time passed between the first keyframe and the next keyframe.
durationNumberthe duration time between the first keyframe and the next keyframe.
outBufferArraythe output buffer to store the interpolated value.
Returns:
- the output buffer to store the interpolated value.
Type: 
Array