RibbonGeometry constructor
RibbonGeometry(
- ScenePath path, {
- double width = 1.0,
- int stations = 64,
- RibbonAlignment alignment = RibbonAlignment.ground,
- Vector3? up,
- GeometryStorage storage = GeometryStorage.fixed,
Sweeps a ribbon of the given width along path.
stations is the number of cross-sections sampled along the path.
up is the reference up direction for RibbonAlignment.ground
(default +Y). Pass GeometryStorage.updatable to allow
updatePath.
Implementation
factory RibbonGeometry(
ScenePath path, {
double width = 1.0,
int stations = 64,
RibbonAlignment alignment = RibbonAlignment.ground,
Vector3? up,
GeometryStorage storage = GeometryStorage.fixed,
}) {
final resolvedUp = up ?? Vector3(0.0, 1.0, 0.0);
return RibbonGeometry._(
width,
stations,
alignment,
resolvedUp,
buildRibbonArrays(
path,
width: width,
stations: stations,
alignment: alignment,
up: resolvedUp,
),
storage,
);
}