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
timecode :number
- Description:
- Gets the timecode.
- Source:
Gets the timecode.
Type:
- number
Methods
seekName($name) → {this}
- Description:
- Seeks to 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