Connectors

Interface with the connector nodes to check status

Description

This module is designed to provide a way for logic to check on the status of connectors within a modular configuration setup. It enables developers to create complex logic that checks on the status of connections between given components or products.

These functions are intended to be used only from within custom code rules within the platform org. We strongly recommend against placing this kind of logic on the front-end, because it makes it difficult to coordinate between the team working with the assets directly and the front-end developers. Access to these areas may be restricted for one party or the other.

To learn more about connectors, visit the Connectors doc.

Methods

getConnected(nodeId: string)

This method provides the connected state of a connector node; it will return null if the connector is open, or the nodeId of the attached connector.

ParameterTypeDescription
nodeIdstringThe node ID for a given connector node.
// This example uses the api object for the player API, which is how we access it from within 
// custom code rules inside ThreeKit.

sofaId = api.scene.findNode({name: 'Sofa 1'});
connectorId = api.scene.findNode({from: sofa1Id, hierarchical: true, type: 'Connector'});

api.connectors.getConnected(connector1Id);