AxesHelper constructor

AxesHelper([
  1. num size = 1
])

Implementation

factory AxesHelper([num size = 1]) {
  List<double> vertices = [
    0,
    0,
    0,
    size.toDouble(),
    0,
    0,
    0,
    0,
    0,
    0,
    size.toDouble(),
    0,
    0,
    0,
    0,
    0,
    0,
    size.toDouble()
  ];

  List<double> colors = [
    1,
    0,
    0,
    1,
    0.6,
    0,
    0,
    1,
    0,
    0.6,
    1,
    0,
    0,
    0,
    1,
    0,
    0.6,
    1
  ];

  var geometry = BufferGeometry();
  geometry.setAttribute(
      'position',
      Float32BufferAttribute(Float32Array.from(vertices), 3, false));
  geometry.setAttribute(
      'color',
      Float32BufferAttribute(Float32Array.from(colors), 3, false));

  var material =
      LineBasicMaterial({"vertexColors": true, "toneMapped": false});

  return AxesHelper.create(
      size: size, geometry: geometry, material: material);
}