-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbusStop.js
More file actions
56 lines (48 loc) · 842 Bytes
/
busStop.js
File metadata and controls
56 lines (48 loc) · 842 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
49
50
51
52
53
54
55
56
function busStop(busPosition) {
noStroke();
// Sign pole
push();
translate(500, -250, 50);
box(10, 500, 10);
pop();
// Sign
push();
translate(500, -450, 75);
box(5, 50, 50);
pop();
// Walls
push();
translate(0, -200, 0);
box(20, 400, 200);
pop();
push();
translate(400, -200, 0);
box(20, 400, 200);
pop();
// Top
fill(255);
textSize(30);
textAlign(CENTER);
text("Wait for bus", 200, -450);
push();
translate(200, -400, 0);
box(500, 20, 200);
pop();
// Bench
push();
translate(250, -50, 0);
box(300, 20, 100);
pop();
// Other person
push();
translate(280, 0, 0);
person();
pop();
// Bus
if (abs(busPosition.x) < 950) {
push();
translate(busPosition.x, busPosition.y + -300, busPosition.z);
box(400, 250, 250);
pop();
}
}