← Back to Docs
  • index.html
  • Clayground
  • Clayground.Canvas3D
  • MultiLine3D
  • Clayground 2025.2
  • MultiLine3D QML Type

    Efficiently renders multiple 3D line paths in a single draw call. More...

    Import Statement: import Clayground.Canvas3D

    Properties

    Detailed Description

    MultiLine3D uses custom shaders to render multiple line paths with consistent screen-space width. This is more efficient than creating multiple Line3D instances when you need to draw many lines.

    Example usage:

    import Clayground.Canvas3D
    
    MultiLine3D {
        coords: [
            [Qt.vector3d(0, 0, 0), Qt.vector3d(100, 0, 0)],
            [Qt.vector3d(0, 50, 0), Qt.vector3d(100, 50, 0)],
            [Qt.vector3d(0, 100, 0), Qt.vector3d(100, 100, 0)]
        ]
        color: "red"
        width: 2.0
    }

    See also Line3D and CustomLineGeometry.

    Property Documentation

    color : color

    The color of all lines.

    This is a convenience alias for material.lineColor.


    coords : list<vector3d>

    Array of line paths, each path being an array of 3D points.


    material : CustomMaterial

    The material used for rendering the lines.

    The material provides lineColor and lineWidth properties which are also exposed via the color and width aliases for convenience.


    width : real

    The width of all lines in screen pixels.

    This is a convenience alias for material.lineWidth.