Class: TimelineTool
@cognite/reveal/tools.TimelineTool
Tool to applying styles to nodes based on date to play them over in Timeline
Hierarchy
-
↳
TimelineTool
Constructors
constructor
• new TimelineTool(cadModel
)
Parameters
Name | Type |
---|---|
cadModel | Cognite3DModel |
Overrides
Cognite3DViewerToolBase.constructor
Defined in
packages/tools/src/Timeline/TimelineTool.ts:22
Methods
createKeyframe
▸ createKeyframe(date
): Keyframe
Create Key frame for the Timeline
Parameters
Name | Type | Description |
---|---|---|
date | Date | date value by Date.now() since January 1, 1970 |
Returns
Defined in
packages/tools/src/Timeline/TimelineTool.ts:63
dispose
▸ dispose(): void
Disposes the element and triggeres the 'disposed' event before clearing the list of dipose-listeners.
Returns
void
Overrides
Cognite3DViewerToolBase.dispose
Defined in
packages/tools/src/Timeline/TimelineTool.ts:184
getAllKeyframes
▸ getAllKeyframes(): Keyframe
[]
Provides all Keyframes in the Timeline
Returns
Keyframe
[]
All Keyframes in Timeline
Defined in
packages/tools/src/Timeline/TimelineTool.ts:180
getKeyframeByDate
▸ getKeyframeByDate(date
): Keyframe
Returns the keyframe at the date given, or undefined if not found.
Parameters
Name | Type |
---|---|
date | Date |
Returns
Defined in
packages/tools/src/Timeline/TimelineTool.ts:76
off
▸ off(event
, handler
): void
Unregisters an event handler for the 'disposed'-event.
Parameters
Name | Type |
---|---|
event | "disposed" |
handler | () => void |
Returns
void
Inherited from
Defined in
packages/tools/src/Cognite3DViewerToolBase.ts:37
pause
▸ pause(): void
Pause any ongoing playback
Returns
void
Defined in
packages/tools/src/Timeline/TimelineTool.ts:161
play
▸ play(startDate
, endDate
, totalDurationInMilliSeconds
): void
Starts playback of Timeline
Parameters
Name | Type | Description |
---|---|---|
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
Defined in
packages/tools/src/Timeline/TimelineTool.ts:110
removeKeyframe
▸ removeKeyframe(keyframe
): void
Removes the Keyframe from the timeline. Does nothing if the keyframe isn't part of the timeline.
Parameters
Name | Type | Description |
---|---|---|
keyframe | Keyframe | Keyframe to be removed from the timeline |
Returns
void
Defined in
packages/tools/src/Timeline/TimelineTool.ts:84
removeKeyframeByDate
▸ removeKeyframeByDate(date
): void
Removes the Keyframe from the Timeline
Parameters
Name | Type | Description |
---|---|---|
date | Date | Date of the Keyframe to be removed from the Timeline |
Returns
void
Defined in
packages/tools/src/Timeline/TimelineTool.ts:96
resume
▸ resume(): void
Resume any paused playback
Returns
void
Defined in
packages/tools/src/Timeline/TimelineTool.ts:170
stop
▸ stop(): void
Stops any ongoing playback
Returns
void
Defined in
packages/tools/src/Timeline/TimelineTool.ts:151
subscribe
▸ subscribe(event
, listener
): void
Subscribe to the Date changed event
Parameters
Name | Type | Description |
---|---|---|
event | "dateChanged" | dateChanged event |
listener | TimelineDateUpdateDelegate | Listen to Timeline date Update during Playback |
Returns
void
Defined in
packages/tools/src/Timeline/TimelineTool.ts:34
unsubscribe
▸ unsubscribe(event
, listener
): void
Unsubscribe to the Date changed event
Parameters
Name | Type | Description |
---|---|---|
event | "dateChanged" | dateChanged event |
listener | TimelineDateUpdateDelegate | Remove Listen to Timeline date Update |
Returns
void