public Z0010spect(int start, int stop) { this.start = start; this.stop = stop; framedelta = 100; points = new vec3[8 * NBARS]; _points = new vec3[points.Length]; pcubes = new Pcube[NBARS]; rects = new Rect[6 * NBARS]; Cube[] cubes = new Cube[NBARS]; Color[] colors = new Color[] { Color.Cyan, Color.Lime, Color.Red, Color.White, Color.DeepPink, Color.Blue }; for (int i = 0; i < NBARS; i++) { int bi = 8 * i; vec3 bp = v3(0f + SQSIZE * (i - NBARS / 2), 50f, 70f); pcubes[i] = new Pcube(points, bi); pcubes[i].set(bp, SQSIZE, SQSIZE, MAXHEIGHT); cubes[i] = new Cube(colors, _points, bi); } int[] order = { Cube.F, Cube.B, Cube.R, Cube.L, Cube.U, Cube.D }; for (int i = 0; i < 6; i++) { for (int j = 0; j < NBARS; j++) { rects[i * NBARS + j] = cubes[j].rects[order[i]]; } } }
public Z0020spect(int start, int stop) { this.start = start; this.stop = stop; framedelta = 100; points = new vec3[8 * NBARS]; _points = new vec3[points.Length]; pcubes = new Pcube[NBARS]; rects = new Rect[6 * NBARS]; orects = new Orect[6 * NBARS]; cubes = new Cube[NBARS]; Color[] colors = new Color[] { Color.Cyan, Color.Lime, Color.Red, Color.White, Color.DeepPink, Color.Blue }; for (int i = 0; i < NBARS; i++) { int bi = 8 * i; vec3 bp = v3(Zsc.mid); bp.z -= MAXHEIGHT / 4f; bp.x += SQSIZE * (i - NBARS / 2f); pcubes[i] = new Pcube(points, bi); pcubes[i].set(bp, SQSIZE, SQSIZE, MAXHEIGHT); cubes[i] = new Cube(colors, _points, bi); } int[] order = { Cube.D, Cube.R, Cube.U, Cube.L, Cube.B, Cube.F }; for (int j = 0; j < NBARS; j++) { for (int i = 0; i < 6; i++) { int idx = j * 6 + i; rects[idx] = cubes[j].rects[order[i]]; var or = new Orect(rects[idx], 0); or.addCommandOverride(new FadeCommand(stop - 300, stop, 1f, 0f)); orects[reorder(idx)] = or; } } }