LineSegmentsGeometry constructor

LineSegmentsGeometry()

Implementation

LineSegmentsGeometry() : super() {
  List<double> positions = [
    -1,
    2,
    0,
    1,
    2,
    0,
    -1,
    1,
    0,
    1,
    1,
    0,
    -1,
    0,
    0,
    1,
    0,
    0,
    -1,
    -1,
    0,
    1,
    -1,
    0
  ];
  List<double> uvs = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2];
  List<int> index = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];

  this.setIndex(index);
  this.setAttribute('position',
      new Float32BufferAttribute(Float32Array.from(positions), 3, false));
  this.setAttribute(
      'uv', new Float32BufferAttribute(Float32Array.from(uvs), 2, false));
}