KeyframeClip

An KeyframeClip is a reusable set of keyframe tracks which represent an animation.

Constructor

new KeyframeClip(nameopt, tracksopt, durationopt)

Parameters:
NameTypeAttributesDefaultDescription
namestring<optional>
''

A name for this clip.

tracksArray.<KeyframeTrack><optional>
[]

An array of KeyframeTracks.

durationnumber<optional>

The duration of this clip (in seconds). If not passed, the duration will be calculated from the passed tracks array.

Members

duration :number

The duration of this clip (in seconds). If a negative value is passed, the duration will be calculated from the passed tracks array.

Type:
  • number

name :string

A name for this clip.

Type:
  • string

tracks :Array.<KeyframeTrack>

An array of KeyframeTracks.

Type:

Methods

resetDuration() → {KeyframeClip}

Sets the duration of the clip to the duration of its longest KeyframeTrack.

Returns:
Type: 
KeyframeClip