A dynamic connection line between two scene nodes, drawn in a batch. More...
| Import Statement: | import Clayground.Canvas3D |
Connector3D declaratively links two nodes: it draws a line from the scene position of from to the scene position of to and keeps following them as they move. Connectors do not render on their own - they register into a ConnectorLayer3D, which draws all of its connectors as a single instanced draw call and updates only the endpoints that moved each frame.
A connector attaches to a layer in one of two ways:
Example usage:
import QtQuick3D import Clayground.Canvas3D ConnectorLayer3D { id: links Connector3D { from: nodeA; to: nodeB; color: "#ff3366"; width: 3 } }
See also ConnectorLayer3D and LineBatch3D.
color : color |
The connector color. Defaults to the layer's color.
from : QtObject |
The node the connector starts at (its scene position is tracked).
layer : ConnectorLayer3D |
The layer this connector draws into.
When null, the connector auto-discovers an enclosing ConnectorLayer3D up the parent chain. Set it explicitly for Repeater3D delegates.
styleId : int |
The style-table row selecting dash/cap/opacity. Defaults to the layer's styleId. See LineBatch3D::styles.
to : QtObject |
The node the connector ends at (its scene position is tracked).
width : real |
The connector width. Defaults to the layer's width.