Commit | Line | Data |
---|---|---|
a68abe8c BM |
1 | class Sandbox extends SCPattern |
2 | { | |
3 | ||
47011215 | 4 | Sandbox(GLucose glucose) { |
a68abe8c BM |
5 | super(glucose); |
6 | } | |
7 | int c=0; | |
8 | int huerange=255; | |
9 | int cuberange = 74; | |
10 | ||
11 | int counter=0; | |
12 | public void run(int deltaMs) { | |
13 | Cube cube = model.cubes.get((int) c); | |
14 | println("face length "+cube.faces.size()); | |
15 | if(cube.faces.size()!=4) | |
16 | { | |
17 | for(Face f : cube.faces) | |
18 | { | |
19 | double col = Math.random()*255; | |
20 | for(Point p: f.points) | |
21 | { | |
22 | colors[p.index] = color(Math.round(col),255,255); | |
23 | } | |
24 | } | |
25 | ||
26 | ||
27 | } | |
28 | if(counter% 3 ==0) | |
29 | { | |
30 | c = (c+1) % cuberange; | |
31 | } | |
32 | counter++; | |
33 | println(c); | |
34 | } | |
35 | } |