Composition object

Properties

Name
Type
Example
Description

id

String

"303798-latest-1589207585405"

The ID of the composition.

Methods

The composition object has following methods:

Method
Return type
Brief description

Object

Returns the composition object of a sub-composition with a specified name.

Object

Returns the composition object of a sub-composition with a specified id.

Object

Returns a composition's control nodes.

getDataNode()

Object

Returns a composition's data nodes.

Object

Returns a composition's logic layers.

Object

Returns a composition's model description.

Object

Returns a composition's payload as an array.

Object

Returns a composition's payload as a JSON object.

Object

Returns a composition's state.

Object

Returns the composition object of a sub-composition with a specified id.

-

Jumps to the animation state specified by to.

Object

Returns an array of a composition's sub-compositions.

-

Plays to the animation state specified by to.

-

Sends a custom message.

-

Sets a composition's payload.

find(name)

Returns an array of composition objects with a specified name.

Parameters

Name
Type
Description

name

String

The name of the composition.

Return

Array: An array of composition objects

See also

Composition object

getCompositionById(id)

Returns the composition object of a sub-composition with a specified id.

Parameters

Name
Type
Description

id

String

The sub-composition ID.

Return

object: Composition object

See also

Composition object

getControlNode()

Returns a composition's control node model and payload.

Return

object: A JSON description, if the composition has control nodes undefined: if the composition doesn't have any control nodes

getLogicLayer()

Returns a composition's logic layer details.

Return

object: a JSON description, if a logic layer has been defined for the composition

undefined: if no logic layer has been defined for the composition

getModel()

Returns the model description of a composition's control node fields.

Return

object: An array of JSON objects, if the composition has control nodes

undefined: if the composition doesn't have any control nodes

getPayload()

Returns the payload of a composition's control node.

Return

object: An array of JSON objects, if the composition has control nodes

undefined: if the composition doesn't have any control nodes

getPayload2()

Returns the control node content from the composition as a JSON object.

getState()

Returns the composition's animation state.

Return

String: animation state

getSubcompositionById(id)

Returns the composition object of a sub-composition with a specified id.

Parameters

Name
Type
Description

id

String

ID of the sub-composition

Return

object: Composition object

See also

Composition object

jumpTo(to)

Jumps to the animation state specified by to.

Return

none

listSubcompositions()

Returns an array of a composition's sub-compositions.

Return

object: An array of JSON objects

playTo(to)

Plays to the animation state specified by to.

Return

none

sendMessage(message)

Send a message to the composition. Use the message listenerarrow-up-right to receive the message in the Composition Script.

Attributes
Type
Required
Description

object

object

Yes

Custom data as JSON object

setPayload(payload)

Sets the payload of a composition's control nodes.

Return

none

Last updated

Was this helpful?