new Timeline(keyframesopt, nullable)
Timeline
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
keyframes |
Array.<FORGE.Keyframe> |
<optional> <nullable> |
Array of keyframes for this timeline. |
- Source:
Extends
Members
(readonly) alive :boolean
Get the alive flag value of the object.
Type:
- boolean
- Inherited From:
- Source:
(readonly) className :string
Get the class name of the object.
Type:
- string
- Inherited From:
- Source:
data :*
Get and set any custom data you want to associate to this object.
Type:
- *
- Inherited From:
- Source:
debug :boolean
Get and set the debug flag.
Type:
- boolean
- Inherited From:
- Source:
(readonly) keyframes :Array.<FORGE.Keyframe>
Get the keyframes array.
Type:
- Array.<FORGE.Keyframe>
- Source:
(readonly) onDestroy :FORGE.EventDispatcher
Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
- Inherited From:
- Source:
(readonly) tags :Array
Get the tags associated to this object.
Type:
- Array
- Inherited From:
- Source:
(readonly) uid :string
Get the uid of the object.
Type:
- string
- Inherited From:
- Source:
warning :boolean
Get and set the warning flag.
Type:
- boolean
- Inherited From:
- Source:
Methods
addKeyframe(keyframe)
Add a keyframe to the timeline.
Parameters:
Name | Type | Description |
---|---|---|
keyframe |
FORGE.Keyframe | Keyframe to add. |
- Source:
destroy()
Destroy this object.
- Overrides:
- Source:
emptyKeyframes()
Clear all keyframes.
- Source:
getKeyframes(time) → {TimelinePrevNext}
Get an object containing the previous and next keyframes given a specific time.
Parameters:
Name | Type | Description |
---|---|---|
time |
number | Time to get the keyframes at |
- Source:
Returns:
The two keyframes
- Type
- TimelinePrevNext
getKeyframesIndexes(time) → {TimelinePrevNextIndexes}
Get an object containing the indexes of the previous and next keyframes given
a specific time.
Parameters:
Name | Type | Description |
---|---|---|
time |
number | Time to get the keyframes at |
- Source:
Returns:
The two indexes
- Type
- TimelinePrevNextIndexes
getSideKeyframes(time) → {TimelinePrevNext}
Get the side keyframes of the two keyframes associated to the given time.
Parameters:
Name | Type | Description |
---|---|---|
time |
number | Time to get the keyframes at |
- Source:
Returns:
The two keyframes
- Type
- TimelinePrevNext
getSideKeyframesIndexes(time) → {TimelinePrevNextIndexes}
Get the indexes of the side keyframes of the two keyframes associated to the given time.
Parameters:
Name | Type | Description |
---|---|---|
time |
number | Time to get the keyframes at |
- Source:
Returns:
The two keyframes
- Type
- TimelinePrevNextIndexes
hasKeyframes() → {boolean}
Check if this Timeline object has keyframes.
- Source:
Returns:
- Type
- boolean
log(value)
Basic log method, log a string in the console if debug is enabled.
Parameters:
Name | Type | Description |
---|---|---|
value |
* | The value you want to log in the console. |
- Inherited From:
- Source:
warn(valuenullable)
Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
string | Object |
<nullable> |
The value you want to warn in the console. |
- Inherited From:
- Source: