Timeline
class Timeline
A Timeline contains a scene, along with a set of tracks which express how the scene’s layer hierarchy is animated over time.
-
A flattened list of all the animations that belong to the timeline.
Declaration
var animations: Array { get } -
A list of all animation groups that belong to the timeline.
Declaration
var animationsByTiming: Array { get } -
The total duration of the timeline.
Declaration
var duration: Double { get } -
The list of the fonts used in this timeline.
Declaration
var fonts: Array { get } -
The timeline’s unique identifier.
Declaration
var id: String { get } -
The list of images used in this timeline.
Declaration
var images: Array { get } -
A configuration object which represents the state of the scene a time 0.
Declaration
var initialConfiguration: ExplicitConfiguration { get } -
The a snapshot of the scene’s root layer at time 0.
Declaration
var initialRootLayer: LayerSnapshot { get } -
The timeline’s name.
Declaration
var name: String { get } -
The timeline’s scene.
Declaration
var scene: Scene { get } -
The list of sounds used in this timeline.
Declaration
var sounds: Array { get } -
The list of soundTracks that belong to this timeline.
Declaration
var soundTracks: Array { get } -
The minimum time between keyvalues in this timeline.
Declaration
var timeResolution: Double { get } -
The list of track’s which dictate how the scene’s layer hierarchy is animated over time.
Declaration
var tracks: Array { get } -
A dictionary which organizes tracks by layer and property.
Declaration
var tracksByLayerProperty: Dictionary { get } -
A copy of the timeline that has been reversed.
Declaration
var reversed: Timeline { get } -
The object’s description
Declaration
var description: String { get } -
Returns the sequence of animations associated to the specified property of the given layer.
Declaration
func animationsFor(layer snapshot: LayerSnapshot, property propertyID: String) -> ArrayParameters
snapshotThe layer snapshot for which to return the animations.
propertyIDThe ID of the property to return the animations for.
Return Value
The sequence of animations associated to
layers propertyproperty. -
Returns the animations for all the properties of the specifed layer.
Declaration
func animationsForLayer(_ snapshot: LayerSnapshot) -> ArrayParameters
snapshotThe layer snapshot for which to return the animations.
Return Value
The list of animations for all the properties of the specified layer.
-
Creates the list of animation groups for the given layer snapshot.
Declaration
func animationsByTimingForLayer(_ snapshot: LayerSnapshot) -> ArrayParameters
snapshotThe layer snapshot to create the animation groups for.
Return Value
The list of animations group for layer snapshot.
-
Returns the list of keyframes associated to the layer snapshot.
The list of keyframes contains at least 2 elements, one for time 0 and one for time
timeline.durationeven if no keyframes exist at those times.Declaration
func keyframesForLayer(_ snapshot: LayerSnapshot, simulateStepsWithKeyvalues: Bool) -> ArrayParameters
snapshotThe layer snapshot to return the keyframes for.
simulateStepsWithKeyvaluestrueif steps should be simulated via the addition of keyvalues,falseotherwise.Return Value
A chonologically ordered sequence of keyframes associated to the layer snapshot.
-
Creates a snapshot of the timeline’s layer hierarchy at the specified time.
Declaration
func rootLayer(at time: Double) -> LayerSnapshotParameters
timeThe time to generate the snapshot for.
Return Value
The root of the snapshot of the timeline’s layer hierarchy at time
time. -
Fetches the composite path of the layer snaphot at the specified time.
Declaration
func path(layer snapshot: LayerSnapshot, at time: Double) -> CompositePath?Parameters
snapshotThe layer snapshot for which to fetch the composite path.
timeThe time at which to fetch the composite path.
Return Value
The composite of the layer snashot at time
time, ornilif the layer is not a layer of typeshape. -
Returns the list of tracks associated to the specified layer in the timeline.
Declaration
func tracksForLayer(_ layer: Layer) -> ArrayParameters
layerThe layer to return the track’s for.
Return Value
The list of tracks to associated to
layerin the timeline. -
Returns the track for the specified layer and property.
Declaration
func trackFor(layer snapshot: LayerSnapshot, property propertyID: String) -> Track?Parameters
snapshotThe layer snapshot for which to return the track.
propertyIDThe property id of the track to search for.
Return Value
The track for the specified layer snapshot and property, or
nilif such a track does not exist. -
Returns the list of tracks associated to specified layer which are specific to the given layer type.
Declaration
func tracksFor(layer snapshot: LayerSnapshot, ofType layerType: String) -> ArrayParameters
snapshotThe snapshot to return the tracks for.
layerTypeA string representing the layer type.
Return Value
The list of tracks associated to
snapshotspecific to the given layer type. -
Returns the list of non path shape tracks associated to the specified snapshot.
Declaration
func nonPathShapeTracksFor(layer snapshot: LayerSnapshot) -> ArrayParameters
snapshotThe snapshot to return the non path shape tracks for.
Return Value
The list of non path shape tracks associated to the specified snapshot.
-
Returns the value of a specified layer and property at the specified time.
Declaration
func value(property propertyID: String, layer: Layer, time: Double) -> AnyParameters
propertyIDThe id of the property whose value to return.
layerThe layer whose property value to return.
timeThe time for which to return property value of the layer.
Return Value
The value of the specified layer and property at the specified time.
-
Returns the track containing the
combinedPathanimation ofsnapshot.Declaration
func pathTrack(layer snapshot: LayerSnapshot) -> Track?Parameters
snapshotThe snapshot for which to return the track.
Return Value
The track for the
combinedPathproperty ofsnapshot. This method will returnnilif the path ofsnapshotis not animated. -
Returns a track containing the
sizeanimation ofsnapshot.Declaration
func sizeTrack(layer snapshot: LayerSnapshot) -> Track?Parameters
snapshotThe snapshot for which to return the track.
Return Value
The track for the
sizeproperty ofsnapshot. This method will returnnilif the size ofsnapshotis not animated. -
Compares two values for equality.
The
equalsfunction is invoked using infix notation as in the following code snippet:lhs == rhs.Declaration
func equals(_ lhs: Timeline) -> BoolParameters
lhsA value.
rhsAnother value.
Return Value
trueif thelhsandrhsare equal,falseotherwise.