Class: cuiKeyframe

cuiKeyframe

A keyframe defines an array of numeric values at a certain time with tangents for the interpolation right before and right after that time. Instead of using the constructor, objects can also be initialized with "{time : ..., in : ..., out : ..., values : [..., ...]}" (See cuiAnimation.)

new cuiKeyframe(time, inTangent, outTangent, values)

Create a new cuiKeyframe.
Parameters:
Name Type Description
time number The time of the keyframe (in seconds relative to the start of the animation).
inTangent number Number specifying the tangent before the keyframe; -1: linear interpolation, 0: horizontal tangent, 1: cubic Hermite, others: scaled slope of +1/-1 cases.
outTangent number Number specifying the tangent after the keyframe; -1: linear interpolation, 0: horizontal tangent, 1: cubic Hermite, others: scaled slope of +1/-1 cases.
values number[] An array of numbers; all keyframes of one animation should have values arrays of the same size.
Source:

Members

<static> in :number

Number specifying the tangent before the keyframe; -1: linear interpolation, 0: horizontal tangent, 1: cubic Hermite, others: scaled slope of +1/-1 cases.
Type:
  • number
Source:

<static> out :number

Number specifying the tangent after the keyframe; -1: linear interpolation, 0: horizontal tangent, 1: cubic Hermite, others: scaled slope of +1/-1 cases.
Type:
  • number
Source:

<static> time :number

The time of the keyframe (in seconds relative to the start of the animation).
Type:
  • number
Source:

<static> values :number[]

An array of numbers; all keyframes of one animation should have values arrays of the same size.
Type:
  • number[]
Source: