public override void MakeArt() { List <Vector3> circles = CirclePacker.PackCircles(smallSize, largeSize, num, worldSize); for (int i = 0; i < circles.Count; i++) { GameObject game = GameObject.CreatePrimitive(PrimitiveType.Sphere); game.transform.parent = root.transform; game.transform.localPosition = new Vector3(circles[i].x, circles[i].y, 0); game.transform.localScale = new Vector3(circles[i].z, circles[i].z, circles[i].z); } }
public override void MakeArt() { List <Vector3> Cubes = CirclePacker.PackCircles(smallSize, largeSize, num, worldSize); for (int i = 0; i < Cubes.Count; i++) { GameObject g = Instantiate(objects[Random.Range(0, objects.Length)]); g.transform.parent = root.transform; float s = Random.value * .25f; g.transform.localPosition = new Vector3(Cubes[i].x, Cubes[i].y, s); g.transform.localScale = new Vector3(Cubes[i].z, Cubes[i].z, Cubes[i].z); } }