-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcubes.pde
More file actions
28 lines (22 loc) · 713 Bytes
/
cubes.pde
File metadata and controls
28 lines (22 loc) · 713 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
void cubes(float input1){
background(colorArray[2]);
fill(colorArray[4], 100);
// Set up some different colored lights
pointLight(51, 102, 255, 65, 60, 100);
pointLight(200, 40, 60, -65, -60, -150);
// Raise overall light in scene
ambientLight(75, 70, 10);
// Center geometry in display windwow.
// you can changlee 3rd argument ('0')
// to move block group closer(+) / further(-)
translate(width/2, height/2, height/2-100+input1);
// Rotate around y and x axes
rotateY(radians(cubeAngle*2));
rotateX(radians(cubeAngle*5));
// Draw cubes
for (int i = 0; i < cubes.length; i++){
cubes[i].drawCube();
}
// Used in rotate function calls above
cubeAngle += 0.2;
}