Composition object
Properties
id
String
"303798-latest-1589207585405"
The ID of the composition.
Methods
The composition object has following methods:
Object
Returns the composition object of a sub-composition with a specified id.
getDataNode()
Object
Returns a composition's data nodes.
Object
Returns the composition object of a sub-composition with a specified id.
find(name)
Returns an array of composition objects with a specified name.
Parameters
name
String
The name of the composition.
Return
Array: An array of composition objects
See also
getCompositionById(id)
Returns the composition object of a sub-composition with a specified id.
Parameters
id
String
The sub-composition ID.
Return
object: Composition object
See also
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
id
String
ID of the sub-composition
Return
object: Composition object
See also
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 listener to receive the message in the Composition Script.
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?