Composition instance

compInstance: {onAirRefId: '56344bcd-9b83-43e2-863b-a5e5fde60c4f', getDuration: ƒ,  is2Timeline: ƒ, …}
> animate: ƒ (t)
> destroy: ƒ ()
> getDuration: ƒ ()
> is2Timeline: ƒ ()
> jumpTo: ƒ (t)
> onAirRefId: "56344bcd-9b83-43e2-863b-a5e5fde60c4f"
> playTo: ƒ (t,i)
> resize: ƒ (t,e)
> seek: ƒ (t,i)
> setControlNode: ƒ (t)
> setWidgetNode: ƒ (t)
> stop: ƒ ()

Properties

Name
Type
Example
Description

onAirRefId

String

"56344bcd-9b83-43e2-863b-a5e5fde60c4f"

The ID of the sub-composition that contains the widget.

Methods

animate()

Animates a composition instance using the event object(t) produced by an onAnimation callback.

destroy()

Destroys a composition instance.

Return

none

getDuration()

Returns the duration of the In and Out animation timelines.

Return

object: JSON object

is2Timeline()

Returns if a composition instance has one or two timelines.

Return

boolean : false , has single timeline; true, has two timelines

jumpTo()

Jumps to a specified animation state.

Parameter

Name
Type
Description

toState

String

In: jump to "In" state Out: jump to "Out" state

playTo()

Plays the animation to the specified state.

Parameter

Name
Type
Description

toState

String

In: jump to "In" state Out: jump to "Out" state

resize()

Resizes a composition instance when a window size changes.

Return

none

seek()

Seeks the timeline to the specified time in [s].

Parameter

Name
Type
Description

t

Number

Time in [s].

Return

none

setControlNode()

Sets the content of control nodes defined in a composition instance.

circle-info

Users can manually define control nodes in widget compositions.

Parameter

Name
Type
Description

payload

JSON

A payload that contains control node content.

Return

none

setWidgetNode()

Sets the content of widget nodes defined in a composition instance.

circle-info

Widget nodes are created programmatically and managed by the widget dynamically.

Parameter

Name
Type
Description

payload

JSON

A payload containing widget node content.

Return

none

stop()

Stops a widget animation.

Last updated