LineSegmentData constructor

LineSegmentData({
  1. required Float32List positions,
  2. Float32List? normals,
})

Implementation

LineSegmentData({required this.positions, this.normals}) {
  if (positions.length % 6 != 0) {
    throw ArgumentError(
      'positions has ${positions.length} floats; expected six per segment '
      '(two xyz endpoints)',
    );
  }
  if (normals != null && normals!.length != positions.length) {
    throw ArgumentError(
      'normals must match positions in length when supplied',
    );
  }
}