-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.pde
More file actions
48 lines (40 loc) · 661 Bytes
/
Copy pathmain.pde
File metadata and controls
48 lines (40 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// initialize variables
int size;
int x_center1;
int y_center1;
int x_center2;
int y_center2;
int margin;
float decay;
boolean run;
Grid grid;
void config() {
run = true;
size = 25;
decay = .9;
margin = 25;
}
void settings() {
size(400, 400);
smooth(0);
}
void setup() {
config();
grid = new Grid();
}
void draw() {
background(0, 0, 0);
grid.update();
grid.coordinates();
grid.lines();
//demo
grid.cells[grid.getIndex(1, 4)].on();
grid.cells[grid.getIndex(2, 3)].on();
grid.cells[grid.getIndex(3, 4)].on();
grid.cells[grid.getIndex(2, 5)].on();
}
void keyPressed() {
if (keyCode == 32) {
println("run");
}
}