Travis Bobier
 · Professional Nerd

Ceros SDK: Synced Object-level Commands Glossary

About this Guide

This article contains a glossary of Ceros SDK SyncedObject-level commands to use when writing your own SDK code. Please note that all listed commands are as is, and we cannot guarantee all functionality to work across all experiences and devices.

Methods Inherited from CerosLayer:

  • findAllComponents()

    • Returns a CerosComponentCollection of all components in the CerosSyncedObject

  • getPayload()

  • getTags()

  • getPage()

  • isComponent()

  • isSyncedObject()

  • isGroup()

  • isFolder()

  • show()

  • hide()

  • on

  • Methods Inherited from CerosLayerCollection:

    • show()

    • hide()

    • on()

    • merge()

findAllLayers()

called onCerosSyncedObjectCerosSyncedObjectCollection arguments: none

Returns a CerosLayerCollection containing the components in the CerosSyncedObject. If called on a CerosSyncedObjectCollection, this method will return all unique layers in all the syncedObjects in the collection. Important note: Commands run on layers returned from this method affect the layers in all uses of the syncedObject.

var layers = mySyncedObject.findAllLayers();
layers.hide(); // hides all layers in the syncedObject

click()

called on: CerosSyncedObject or CerosSyncedObjectCollection arguments: none

Simulates a click event on the syncedObject(s) that this is called on. This is equivalent to the user clicking the syncedObject(s), and all events/animations that would be triggered by a user clicking the syncedObject(s) will also be triggered by calling this method.

var mySyncedObject = experience.findSyncedObjectById('a-syncedObject-id');
mySyncedObject.click();

on(eventName, callback)

called on: CerosSyncedObject arguments: eventName – The name of the event to subscribe to callback – The function to run when this event is received

See Events

1