-
Notifications
You must be signed in to change notification settings - Fork 2
/
commands.js
99 lines (92 loc) · 2.13 KB
/
commands.js
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// CO2-Budget-Commands
// by Olaf Val
var co2B
var l;
function setup() {
createCanvas(600, 600);
co2B = new Co2Budget(1.5, 1);
}
function draw() {
background(50);
// Co2-Budget Values - - - - - - - - - - -
textSize(18);
fill(255);
l = 0;
text('C02-Budget (1.5 °C):', 100, 80 + 20 * l);
l++;
text(co2B.budgetT() + ' tons', 100, 80 + 20 * l);
l++;
text(co2B.budgetTString() + ' tons', 100, 80 + 20 * l);
l++;
l++;
text(co2B.budgetKt() + ' kilotons', 100, 80 + 20 * l);
l++;
text(co2B.budgetKtString() + ' kilotons', 100, 80 + 20 * l);
l++;
l++;
text(co2B.budgetMt() + ' megatons', 100, 80 + 20 * l);
l++;
text(co2B.budgetMtString() + ' megatons', 100, 80 + 20 * l);
l++;
l++;
text(co2B.budgetGt() + ' gigatons', 100, 80 + 20 * l);
l++;
l++;
l++;
text("Countdown:", 100, 80 + 20 * l);
l++;
text(co2B.seconds() + ' seconds', 100, 80 + 20 * l);
l++;
text(co2B.minutes() + ' minutes', 100, 80 + 20 * l);
l++;
text(co2B.hours() + ' hours', 100, 80 + 20 * l);
l++;
text(co2B.days() + ' days', 100, 80 + 20 * l);
l++;
text(co2B.months() + ' months', 100, 80 + 20 * l);
l++;
text(co2B.years() + ' years', 100, 80 + 20 * l);
l++;
l++;
text(co2B.time(), 100, 80 + 20 * l);
// Co2-Budget Commands - - - - - - - - - - -
textSize(14);
fill(255);
l = 0;
text('co2B = new Co2Budget(1.5, 1)', 350, 80 + 20 * l);
l++;
text('co2B.budgetT()', 350, 80 + 20 * l);
l++;
text('co2B.budgetTString()', 350, 80 + 20 * l);
l++;
l++;
text('co2B.budgetKt()', 350, 80 + 20 * l);
l++;
text('co2B.budgetKtString()', 350, 80 + 20 * l);
l++;
l++;
text('co2B.budgetMt()', 350, 80 + 20 * l);
l++;
text('co2B.budgetMtString()', 350, 80 + 20 * l);
l++;
l++;
text('co2B.budgetGt()', 350, 80 + 20 * l);
l++;
l++;
l++;
l++;
text('co2B.seconds()', 350, 80 + 20 * l);
l++;
text('co2B.minutes()', 350, 80 + 20 * l);
l++;
text('co2B.hours()', 350, 80 + 20 * l);
l++;
text('co2B.days()', 350, 80 + 20 * l);
l++;
text('co2B.months()', 350, 80 + 20 * l);
l++;
text('co2B.years()', 350, 80 + 20 * l);
l++;
l++;
text('co2B.time()', 350, 80 + 20 * l);
}