forked from yining1023/brickBreaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makingof.js
96 lines (76 loc) · 2.58 KB
/
makingof.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
let soundtrack;
let inconsolata;
let lastLineHeight = 0;
const LINE_HEIGHT = 28;
function preload() {
soundtrack = loadSound('assets/SpiegelImSpiegelMonoShort.mp3');
inconsolata = loadFont('assets/inconsolata.otf');
}
function setup() {
setupCanvas(false);
soundtrack.loop();
cursor(HAND);
}
function draw() {
lastLineHeight = 0;
background(255);
textFont(inconsolata);
textSize(30);
fill(0);
if(BWB_LANG == BWB_LANG_EN) {
addHeading('SOFTWARE');
addParagraph('p5.js, p5.play, Blender3D, Inkscape, GIMP, G\'MIC, Audacity');
addLineBreak();
addHeading('LEVEL 1 - Caen');
addParagraph('Apples, dark chocolate');
addLineBreak();
addHeading('LEVEL 2 - Le Havre');
addParagraph('Beetroot, white chocolate');
addLineBreak();
addHeading('LEVEL 3 - World');
addParagraph('Vegan crêpes, dark & white chocolate');
addLineBreak();
addHeading('P5.js / WEBGL (home, level transitions)');
addParagraph('OBJ 3d model, GLSL pixel shader particles, BLionTaleFont');
addLineBreak();
addHeading('MUSIC');
addParagraph('Arvo Pärt, Camille Saint-Saëns, C. De Bussy, C. Gounod');
} else {
addHeading('LOGICIELS');
addParagraph('p5.js, p5.play, Blender3D, Inkscape, GIMP, G\'MIC, Audacity');
addLineBreak();
addHeading('NIVEAU 1 - Caen');
addParagraph('Pommes, chocolat noir');
addLineBreak();
addHeading('NIVEAU 2 - Le Havre');
addParagraph('Betteraves, chocolat blanc');
addLineBreak();
addHeading('NIVEAU 3 - World');
addParagraph('Crêpes vegan, chocolats noir & blanc');
addLineBreak();
addHeading('P5.js / WEBGL (accueil, transitions de niveaux)');
addParagraph('Modèle 3d OBJ, particules pixel shader GLSL, BLionTaleFont');
addLineBreak();
addHeading('MUSIQUE');
addParagraph('Arvo Pärt, Camille Saint-Saëns, C. De Bussy, C. Gounod');
}
}
function addLineBreak() {
lastLineHeight += LINE_HEIGHT;
}
function addHeading(msg) {
lastLineHeight += LINE_HEIGHT;
fill(lerp(0,200,mouseX/width));
text(msg, 10, lastLineHeight);
}
function addParagraph(msg) {
fill(lerpColor(color(0,255,255), color(255,0,255), (mouseX/width + mouseY/height) / 2.0));
lastLineHeight += LINE_HEIGHT;
text(msg, 10, lastLineHeight);
}
function mouseReleased() {
userStartAudio(); // Chrome hack
if (mouseX < width && mouseX > 0 && mouseY < height && mouseY > 0) {
redirectToUrlFor('pics');
}
}