Timeline

Wick. Timeline

Class representing a Wick Timeline.

Constructor

new Timeline()

Description:
  • Create a timeline.

Source:

Members

activeFrame :Wick.Frame

Description:
  • The active frame, determined by the playhead position.

Source:

The active frame, determined by the playhead position.

Type:

activeFrames :Array.<Wick.Frame>

Description:
  • The active frames, determined by the playhead position.

Source:

The active frames, determined by the playhead position.

Type:

activeLayer :Wick.Layer

Description:
  • The active layer.

Source:

The active layer.

Type:

activeLayerIndex :number

Description:
  • The index of the active layer. Determines which frame to draw onto.

Source:

The index of the active layer. Determines which frame to draw onto.

Type:
  • number

clips :Array.<Wick.Clip>

Description:
  • All clips inside the timeline.

Source:

All clips inside the timeline.

Type:

fillGapsMethod :string

Description:
  • The method to use to fill gaps in-beteen frames. Options: "blank_frames" or "auto_extend" (see Wick.Layer.resolveGaps)

Source:

The method to use to fill gaps in-beteen frames. Options: "blank_frames" or "auto_extend" (see Wick.Layer.resolveGaps)

Type:
  • string

frameForced

Description:
  • Returns true if the frame was forced previously.

Source:

Returns true if the frame was forced previously.

frames :Array.<Wick.Frame>

Description:
  • All frames inside the timeline.

Source:

All frames inside the timeline.

Type:

layers :Wick.Layer

Description:
  • The layers that belong to this timeline.

Source:

The layers that belong to this timeline.

Type:

length :number

Description:
  • The total length of the timeline.

Source:

The total length of the timeline.

Type:
  • number

playheadPosition :number

Description:
  • The position of the playhead. Determines which frames are visible.

Source:

The position of the playhead. Determines which frames are visible.

Type:
  • number

waitToFillFrameGaps :boolean

Description:
  • Check if frame gap fixing should be deferred until later. Read only.

Source:

Check if frame gap fixing should be deferred until later. Read only.

Type:
  • boolean

Methods

addFrame(frame)

Description:
  • Add a frame to one of the layers on this timeline. If there is no layer where the frame wants to go, the frame will not be added.

Source:
Parameters:
Name Type Description
frame Wick.Frame

the frame to add

addLayer(layer)

Description:
  • Adds a layer to the timeline.

Source:
Parameters:
Name Type Description
layer Wick.Layer

The layer to add.

addTween(tween)

Description:
  • Adds a tween to a frame on this timeline.

Source:
Parameters:
Name Type Description
tween Wick.Tween

the tween to add.

advance()

Description:
  • Advances the timeline one frame forwards. Loops back to beginning if the end is reached.

Source:

deferFrameGapResolve()

Description:
  • Disables frame gap filling until resolveFrameGaps is called again.

Source:

forceFrame(frame)

Description:
  • Forces timeline to move to the next frame.

Source:
Parameters:
Name Type Description
frame number

getAllFrames(recursive)

Description:
  • Get all frames in this timeline.

Source:
Parameters:
Name Type Description
recursive boolean

If set to true, will also include the children of all child timelines.

getFrameByName()

Description:
  • Finds the frame with a given name.

Source:

getFramesAtPlayheadPosition(playheadPosition) → {Array.<Wick.Frame>}

Description:
  • Gets the frames at the given playhead position.

Source:
Parameters:
Name Type Description
playheadPosition number

the playhead position to search.

Returns:

The frames at the playhead position.

Type
Array.<Wick.Frame>

getFramesInRange(playheadPositionStart, playheadPositionEnd, layerIndexStart, layerIndexEnd) → {Array.<Wick.Frame>}

Description:
  • Gets all frames in the layer that are between the two given playhead positions and layer indices.

Source:
Parameters:
Name Type Description
playheadPositionStart number

The start of the horizontal range to search

playheadPositionEnd number

The end of the horizontal range to search

layerIndexStart number

The start of the vertical range to search

layerIndexEnd number

The end of the vertical range to search

Returns:

The frames in the given range.

Type
Array.<Wick.Frame>

gotoAndPlay(frame)

Description:
  • Plays the timeline and moves to a given frame number or name.

Source:
Parameters:
Name Type Description
frame string | number

A playhead position or name of a frame to move to.

gotoAndStop(frame)

Description:
  • Stops the timeline and moves to a given frame number or name.

Source:
Parameters:
Name Type Description
frame string | number

A playhead position or name of a frame to move to.

gotoFrame(frame)

Description:
  • Moves the playhead to a given frame number or name.

Source:
Parameters:
Name Type Description
frame string | number

A playhead position or name of a frame to move to.

gotoNextFrame()

Description:
  • Moves the timeline forward one frame. Loops back to 1 if gotoNextFrame moves the playhead past the past frame.

Source:

gotoPrevFrame()

Description:
  • Moves the timeline backwards one frame. Loops to the last frame if gotoPrevFrame moves the playhead before the first frame.

Source:

makeTimelineInBounds()

Description:
  • Ensures playhead position is in bounds.

Source:

moveLayer(layer, index)

Description:
  • Moves a layer to a different position, inserting it before/after other layers if needed.

Source:
Parameters:
Name Type Description
layer Wick.Layer

The layer to add.

index number

the new position to move the layer to.

play()

Description:
  • Makes the timeline advance automatically during ticks.

Source:

removeLayer(layer)

Description:
  • Remmoves a layer from the timeline.

Source:
Parameters:
Name Type Description
layer Wick.Layer

The layer to remove.

resolveFrameGaps(newOrModifiedFrames)

Description:
  • Fill in all gaps between frames in all layers in this timeline.

Source:
Parameters:
Name Type Description
newOrModifiedFrames Array.<Wick.Frame>

The frames that should not be affected by the gap fill by being extended or shrunk.

resolveFrameOverlap(newOrModifiedFrames)

Description:
  • Prevents frames from overlapping each other by removing pieces of frames that are touching.

Source:
Parameters:
Name Type Description
newOrModifiedFrames Array.<Wick.Frame>

the frames that should take precedence when determining which frames should get "eaten".

stop()

Description:
  • Stops the timeline from advancing during ticks.

Source: