generateSphereList function

List<Model3D<Model3D>> generateSphereList(
  1. int n
)

Implementation

List<Model3D> generateSphereList(int n) {
  List<Sphere3D> spheres = [];
  for (double i = 0; i < n; i++) {
    for (double j = 0; j < n; j++) {
      for (double k = 0; k < n; k++) {
        spheres.add(Sphere3D(0.001, Vector3(i, j, k),
            color: Color.fromARGB(255, 255, 0, 0)));
      }
    }
  }
  return spheres;
}