Reveal allows for applying styles to nodes based on date property and can be viewed as a playable entity where node styles are applied to different nodes which can be used to showcase progress of the model construction. The API is influenced by the node styling API and it's recommended to read up on this documentation before reading this document.
The test data used in the documentation site is for testing and to show the capabilities of the tool. The examples shown is therefore might not be a ideal model construction progression.
The timeline tool provides ability to apply styles by date. It works by creating a set of "keyframes" for provided dates. Each keyframe has a set of associated styled node collections.
To create a
date- Date reference for the keyframe
Add styled node collections to keyframes
Tool provides feature to add nodes & styles to a Keyframe or number of Keyframes or to all of the Keyframes. For more information on assigning styles please refer CAD Styling.
Remove styled node collections from keyframes
Styled node collections can be removed from keyframes.
nodeCollection- Node set to be removed from keyframes.
play(startDate: Date, endDate: Date, durationInMilliSeconds: number)
startDate- Keyframe date to start the playback of the timeline keyframes.
endDate- Keyframe date to stop the playback of the timeline keyframes.
durationInMilliSeconds- Number of milli-seconds for the full playback of keyframes.
Note that the dates doesn't need to match the keyframe dates - the playback will be performed on a "virtual" timeline that is linear in time and update the styling whenever a new keyframe is activated. Only one keyframe will be active at any given time, i.e. the model will only have styling from one keyframe active at any time.
Stop timeline playback
Get Keyframe by Date
date- Date of the Keyframe which needs retrived.
Reacting to date changes while in playback mode
While in the play state, the tool emits events which will be helpful for the users to calculate the progression of the playback of the timeline.
The tool provides a
TimelineDateUpdateDelegate event which can be subscribed to received below data.
date- Virtual date which can be used to calculate progression.
activeKeyframe- Current active
Keyframein the playback.
startDate- Virtual date to start the playback of the timeline.
endDate- Virtual date to stop the playback of the timeline.
If we have subscribed to
dateChanged event and if there are no active Keyframe during Timeline playback, than
activeKeyframe data will be
To unsubscribe from
To remove any Keyframe, use
date- Date of the Keyframe which needs to be removed from the Timeline.
To remove any Keyframe, use
keyframe- Keyframe to be removed from the Timeline.
Keyframes in Timeline
Gets all Keyframes in the Timeline