Renders multiple 3D line paths in a single draw call. More...
| Import Statement: | import Clayground.Canvas3D |
MultiLine3D draws many line paths with one uniform color and width. It is a thin wrapper over the instanced LineBatch3D backend: every path becomes a styled line in a shared batch, so the whole set is drawn as a single instanced draw call with camera-facing, constant-world-width ribbons.
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 LineBatch3D.
color : color |
The color of all lines. Defaults to red.
coords : list<vector3d> |
Array of line paths, each path being an array of 3D points.
orientation : int |
LineBatch3D.Billboard (default) or LineBatch3D.Flat.
Billboard ribbons always face the camera, which is right for a line in the air and wrong for a marking on the ground: on a curve, consecutive camera-facing quads splay apart and leave wedge-shaped gaps at the joins. Anything that represents a surface - a road, a lane, a trace on a board - wants Flat.
width : real |
The width of all lines in world units. Defaults to 1.