Class: TimelineTool
Defined in: packages/tools/src/Timeline/TimelineTool.ts:16
Tool to applying styles to nodes based on date to play them over in Timeline
Extends
Constructors
Constructor
new TimelineTool(
cadModel
):TimelineTool
Defined in: packages/tools/src/Timeline/TimelineTool.ts:22
Parameters
cadModel
Returns
TimelineTool
Overrides
Cognite3DViewerToolBase
.constructor
Methods
createKeyframe()
createKeyframe(
date
):Keyframe
Defined in: packages/tools/src/Timeline/TimelineTool.ts:63
Create Key frame for the Timeline
Parameters
date
Date
date value by Date.now() since January 1, 1970
Returns
dispose()
dispose():
void
Defined in: packages/tools/src/Timeline/TimelineTool.ts:185
Disposes the element and triggeres the 'disposed' event before clearing the list of dipose-listeners.
Returns
void
Overrides
Cognite3DViewerToolBase
.dispose
getAllKeyframes()
getAllKeyframes():
Keyframe
[]
Defined in: packages/tools/src/Timeline/TimelineTool.ts:181
Provides all Keyframes in the Timeline
Returns
Keyframe
[]
All Keyframes in Timeline
getKeyframeByDate()
getKeyframeByDate(
date
):undefined
|Keyframe
Defined in: packages/tools/src/Timeline/TimelineTool.ts:76
Returns the keyframe at the date given, or undefined if not found.
Parameters
date
Date
Returns
undefined
| Keyframe
off()
off(
event
,handler
):void
Defined in: packages/tools/src/Cognite3DViewerToolBase.ts:38
Unregisters an event handler for the 'disposed'-event.
Parameters
event
"disposed"
handler
() => void
Returns
void
Inherited from
pause()
pause():
void
Defined in: packages/tools/src/Timeline/TimelineTool.ts:162
Pause any ongoing playback
Returns
void
play()
play(
startDate
,endDate
,totalDurationInMilliSeconds
):void
Defined in: packages/tools/src/Timeline/TimelineTool.ts:110
Starts playback of Timeline
Parameters
startDate
Date
Keyframe date to start the Playback of Keyframes
endDate
Date
Keyframe date to stop the Playback of Keyframes
totalDurationInMilliSeconds
number
Number of milliseconds for all Keyframe within startDate & endDate to be rendered
Returns
void
removeKeyframe()
removeKeyframe(
keyframe
):void
Defined in: packages/tools/src/Timeline/TimelineTool.ts:84
Removes the Keyframe from the timeline. Does nothing if the keyframe isn't part of the timeline.
Parameters
keyframe
Keyframe to be removed from the timeline
Returns
void
removeKeyframeByDate()
removeKeyframeByDate(
date
):void
Defined in: packages/tools/src/Timeline/TimelineTool.ts:96
Removes the Keyframe from the Timeline
Parameters
date
Date
Date of the Keyframe to be removed from the Timeline
Returns
void
resume()
resume():
void
Defined in: packages/tools/src/Timeline/TimelineTool.ts:171
Resume any paused playback
Returns
void
stop()
stop():
void
Defined in: packages/tools/src/Timeline/TimelineTool.ts:152
Stops any ongoing playback
Returns
void
subscribe()
subscribe(
event
,listener
):void
Defined in: packages/tools/src/Timeline/TimelineTool.ts:34
Subscribe to the Date changed event
Parameters
event
"dateChanged"
dateChanged
event
listener
Listen to Timeline date Update during Playback
Returns
void
unsubscribe()
unsubscribe(
event
,listener
):void
Defined in: packages/tools/src/Timeline/TimelineTool.ts:49
Unsubscribe to the Date changed event
Parameters
event
"dateChanged"
dateChanged
event
listener
Remove Listen to Timeline date Update
Returns
void