Timeline

Timeline

Creates timelines.

Constructor

new Timeline($keyframesopt)

Description:
  • Creates a new timeline.
Source:
Example
const timeline = new Timeline(keyframes);
timeline.seekTimecode(0);
timeline.tick(timetick);
Parameters:
Name Type Attributes Description
$keyframes Array.<TimelineKeyframe> <optional>
The keyframes.

Members

keyframes :Array.<TimelineKeyframe>

Description:
  • Gets the keyframes.
Source:
Gets the keyframes.
Type:

timecode :number

Description:
  • Gets the timecode.
Source:
Gets the timecode.
Type:
  • number

Methods

addTimeline($timeline, $timecode)

Description:
  • Adds the given timeline.
Source:
Parameters:
Name Type Description
$timeline Timeline The timeline to add.
$timecode number The timecode offset of the timeline to add.

clone() → {Timeline}

Description:
  • Clones the timeline.
Source:
Returns:
Type
Timeline

offset($timecode) → {this}

Description:
  • Adds a timecode offset.
Source:
Parameters:
Name Type Description
$timecode number The timecode offset to add.
Returns:
Type
this

seekName($name) → {this}

Description:
  • Seeks to the first keyframe with the given name.
Source:
Parameters:
Name Type Description
$name string The name of the keyframe to seek to.
Returns:
Type
this

seekTimecode($timecode) → {this}

Description:
  • Seeks to the given timecode.
Source:
Parameters:
Name Type Description
$timecode number The timecode to seek to (in ms).
Returns:
Type
this

tick($timetick) → {this}

Description:
  • Updates the timeline by one tick update.
Source:
Parameters:
Name Type Description
$timetick number The tick duration (in ms).
Returns:
Type
this