-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
540 lines (427 loc) · 13.4 KB
/
index.html
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
<!DOCTYPE html>
<html>
<head>
<title>24h vélo LLN (2023)</title>
<meta charset="utf-8">
<script src="index.js"></script>
<!-- models -->
<script src="models/kap.js"></script>
<script src="models/radio.js"></script>
<script src="models/guitar.js"></script>
<script src="models/earth.js"></script>
<script src="models/africa.js"></script>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
}
.overlay {
width: 100vw;
height: 100vh;
position: absolute;
}
.cse-warning {
font-size: 3vw;
display: flex;
align-items: center;
flex-direction: column;
color: red;
}
.bsod {
background: url("res/bsod.png") no-repeat center center fixed;
background-size: 100% 100%;
}
.ambulance {
background: url("res/kot-112.jpg") no-repeat center center fixed;
background-size: 100% 100%;
}
.linux {
background: url("res/linux.png") no-repeat center center fixed;
background-size: 100% 100%;
}
.aubergine {
background: url("res/kap-vert.png") no-repeat center center fixed;
background-size: 100% 100%;
}
.jour {
background: url("res/lineup_jour_correct.jpg") no-repeat center center fixed;
background-size: 100% 100%;
}
.nuit {
background: url("res/lineup_nuit_correcte.jpg") no-repeat center center fixed;
background-size: 100% 100%;
}
.belgique {
background: url("res/verdom.png") no-repeat center center fixed;
background-size: 100% 100%;
}
.naruto {
background: url("res/kotmanga.JPG") no-repeat center center fixed;
background-size: 100% 100%;
}
.dejeuner {
background: url("res/FairKot.png") no-repeat center center fixed;
background-size: 100% 100%;
}
.kotan {
background: url("res/kotan.png") no-repeat center center fixed;
background-size: 100% 100%;
}
#cse-warning-text {
font-size: 7vw;
align-content: center;
align-items: center;
}
video {
width: 100%;
height: 100%;
}
/* XXX yeah a little hacky ig */
div[hidden] {
display: none;
}
</style>
<!-- KAP shader -->
<script id="kap-vert" type="x-shader/x-vertex">#version 300 es
precision mediump float;
layout(location = 0) in vec3 a_pos;
layout(location = 1) in vec2 a_tex_coord;
layout(location = 2) in vec3 a_normal;
uniform mat4 u_model;
uniform mat4 u_vp;
out vec3 pos;
out vec4 world_pos;
out vec2 tex_coord;
out vec3 normal;
void main(void) {
pos = a_pos;
world_pos = u_model * vec4(pos, 1.0);
gl_Position = u_vp * world_pos;
tex_coord = a_tex_coord;
normal = a_normal/ 2.0 + 0.5;
}
</script>
<script id="kap-frag" type="x-shader/x-fragment">#version 300 es
precision mediump float;
precision lowp int;
in vec3 pos;
in vec4 world_pos;
in vec2 tex_coord;
in vec3 normal;
uniform vec3 u_pl_pos;
uniform vec3 u_pl_color;
uniform float u_pl_intensity;
uniform float u_time;
uniform bool u_rainbow;
out vec4 frag_colour;
void main(void) {
vec3 light_dir = normalize(u_pl_pos - world_pos.xyz);
float attenuation = dot(normalize(normal), light_dir);
attenuation *= 0.6;
vec3 diffuse = attenuation * u_pl_color;
vec3 albedo = vec3(1.0, 0.0, 1.0);
if (u_rainbow) {
albedo = vec3(abs(sin(u_time)), abs(cos(u_time)), abs(tan(u_time)));
}
albedo *= 0.3;
frag_colour = vec4(albedo + attenuation, 1.0);
}
</script>
<!-- fullbright shader -->
<script id="fullbright-vert" type="x-shader/x-vertex">#version 300 es
precision mediump float;
layout(location = 0) in vec3 a_pos;
layout(location = 1) in vec2 a_tex_coord;
uniform mat4 u_model;
uniform mat4 u_vp;
out vec2 tex_coord;
void main(void) {
gl_Position = u_vp * u_model * vec4(a_pos, 1.0);
tex_coord = a_tex_coord;
}
</script>
<script id="fullbright-frag" type="x-shader/x-fragment">#version 300 es
precision mediump float;
precision lowp int;
uniform sampler2D u_tex;
in vec2 tex_coord;
out vec4 frag_colour;
void main(void) {
vec4 colour = texture(u_tex, tex_coord.yx);
frag_colour = colour;
}
</script>
<!-- melt shader -->
<!-- https://www.shadertoy.com/view/XsX3zl -->
<script id="melt-vert" type="x-shader/x-vertex">#version 300 es
precision mediump float;
layout(location = 0) in vec3 a_pos;
out vec2 fragCoord;
void main(void) {
gl_Position = vec4(a_pos * 2.0, 1.0);
fragCoord = a_pos.xy;
}
</script>
<script id="melt-frag" type="x-shader/x-fragment">#version 300 es
precision mediump float;
#define RADIANS 0.017453292519943295
uniform float iTime;
uniform vec2 iResolution;
const int zoom = 40;
const float brightness = 0.975;
float fScale = 1.25;
float cosRange(float degrees, float range, float minimum) {
return (((1.0 + cos(degrees * RADIANS)) * 0.5) * range) + minimum;
}
out vec4 fragColor;
void main(void)
{
vec2 fragCoord = gl_FragCoord.xy;
float time = iTime * 1.25;
vec2 uv = fragCoord.xy / iResolution.xy;
vec2 p = (2.0*fragCoord.xy-iResolution.xy)/max(iResolution.x,iResolution.y);
float ct = cosRange(time*5.0, 3.0, 1.1);
float xBoost = cosRange(time*0.2, 5.0, 5.0);
float yBoost = cosRange(time*0.1, 10.0, 5.0);
fScale = cosRange(time * 15.5, 1.25, 0.5);
for(int i=1;i<zoom;i++) {
float _i = float(i);
vec2 newp=p;
newp.x+=0.25/_i*sin(_i*p.y+time*cos(ct)*0.5/20.0+0.005*_i)*fScale+xBoost;
newp.y+=0.25/_i*sin(_i*p.x+time*ct*0.3/40.0+0.03*float(i+15))*fScale+yBoost;
p=newp;
}
vec3 col=vec3(0.5*sin(3.0*p.x)+0.5,0.5*sin(3.0*p.y)+0.5,sin(p.x+p.y));
col *= brightness;
fragColor = vec4(col, 1.0);
}
</script>
<!-- printed circuit shader -->
<!-- https://www.shadertoy.com/view/tddXWH -->
<script id="circuit-vert" type="x-shader/x-vertex">#version 300 es
precision mediump float;
layout(location = 0) in vec3 a_pos;
out vec2 fragCoord;
void main(void) {
gl_Position = vec4(a_pos * 2.0, 1.0);
fragCoord = a_pos.xy;
}
</script>
<script id="circuit-frag" type="x-shader/x-fragment">#version 300 es
precision mediump float;
uniform float iTime;
uniform vec2 iResolution;
#define PI 3.14159265359
vec2 rotate(vec2 p, float a) {
return vec2(p.x * cos(a) - p.y * sin(a), p.x * sin(a) + p.y * cos(a));
}
float rand(float n) {
return fract(sin(n) * 43758.5453123);
}
float rand(vec2 n) {
return fract(sin(dot(n, vec2(591.32,391.32))));
}
float rand(vec3 n) {
return fract(sin(dot(n, vec3(591.32,391.32,623.54))));
}
vec2 rand2(in vec2 p) {
return fract(vec2(sin(p.x * 591.32 + p.y * 154.077), cos(p.x * 391.32 + p.y * 49.077)));
}
const float voronoiRandK = 0.8;
vec3 voronoi3(in vec2 x, out vec4 cellCenters) {
vec2 p = floor(x);
vec2 f = fract(x);
vec2 i1 = vec2(0.0);
vec2 i2 = vec2(0.0);
vec3 res = vec3(8.0);
for(int j = -1; j <= 1; j ++) {
for(int i = -1; i <= 1; i ++) {
vec2 b = vec2(i, j);
vec2 r = vec2(b) - f + rand2(p + b) * voronoiRandK;
//float d = max(abs(r.x), abs(r.y));
float d = (abs(r.x) + abs(r.y));
if (d < res.x) {
res.z = res.y;
res.y = res.x;
res.x = d;
i2 = i1;
i1 = p + b;
}
else if (d < res.y) {
res.z = res.y;
res.y = d;
//r2 = r;
i2 = p + b;
}
else if (d < res.z) {
res.z = d;
}
}
}
cellCenters = vec4(i1,i2);
return res;
}
float cubicPulse( float c, float w, float x ) {
x = abs(x - c);
if( x>w ) return 0.0;
x /= w;
return 1.0 - x*x*(3.0-2.0*x);
}
float orderedRand(float x, float y) {
return rand(dot(x > y ? vec2(y,x) : vec2(x,y), vec2(123.23,532.12)));
}
out vec4 fragColor;
void main(void) {
vec2 fragCoord = gl_FragCoord.xy;
vec2 uv = (fragCoord / iResolution.xy - 0.5) * 2.0;
vec2 suv = uv;
uv.x *= iResolution.x / iResolution.y;
uv = rotate(uv, sin(iTime * 0.10));
uv.x += iTime * 0.3;
// first wire
float scale = 4.;
float width = 0.6;
vec4 cellCenters;
vec3 vr = voronoi3(uv * scale + 10.0, cellCenters);
float d = vr.y - vr.x;
if (vr.z - vr.y < width && vr.y - vr.x < width) //connections between cell corners
d = max(width - (vr.z - vr.y), d);
vec2 cellHashes = vec2(rand(cellCenters.xy), rand(cellCenters.zw));
float wire = cubicPulse(width, 0.06, d);
// light
float lightX = (rotate(uv, PI/8.).x+iTime*0.5)*5.;
float lightHash1 = rand(floor(lightX));
float lightValue1 = fract(lightX);
lightX = (rotate(uv, PI*5./8.).x+iTime*0.2)*5.;
float lightHash2 = rand(floor(lightX)+0.5);
float lightValue2 = fract(lightX);
lightX = (rotate(uv, PI*9./8.).x+iTime*0.2)*5.;
float lightHash3 = rand(floor(lightX)+0.5);
float lightValue3 = fract(lightX);
lightX = (rotate(uv, PI*13./8.).x+iTime*0.2)*5.;
float lightHash4 = rand(floor(lightX)+0.5);
float lightValue4 = fract(lightX);
float light = 0.;
float lightFrequency = 0.002;
if (rand(vec3(cellHashes.xy,lightHash1)) < lightFrequency) light = wire*cubicPulse(0.5,0.25,lightValue1)*3.;
if (rand(vec3(cellHashes.xy,lightHash2)) < lightFrequency) light += wire*cubicPulse(0.5,0.25,lightValue2)*3.;
if (rand(vec3(cellHashes.xy,lightHash3)) < lightFrequency) light += wire*cubicPulse(0.5,0.25,lightValue3)*3.;
if (rand(vec3(cellHashes.xy,lightHash4)) < lightFrequency) light += wire*cubicPulse(0.5,0.25,lightValue4)*3.;
// second parallel wire
if ((cellHashes.x - cellHashes.y) > 0.0) {
float w = cubicPulse(width-0.1, 0.06, d);
wire += w;
}
// background wire layer
scale *= 0.4;
vec3 vr2 = voronoi3(uv * scale + 30.0, cellCenters);
d = vr2.y - vr2.x;
if (vr2.z - vr2.y < width && vr2.y - vr2.x < width) //connections between cell corners
d = max(width - (vr2.z - vr2.y), d);
cellHashes = vec2(rand(cellCenters.xy), rand(cellCenters.zw));
float backWire = cubicPulse(width, 0.06, d);
if ((cellHashes.x - cellHashes.y) > 0.0) {
float w = cubicPulse(width-0.1, 0.06, d);
backWire += w;
}
wire = max(wire, backWire * 0.3);
// some background noise
wire += vr.x*0.3 + 0.3;
// apply light
wire = wire * 0.4 + light;
vec3 col = clamp(vec3(0.4, 0.8, 1.0) * wire, vec3(0.), vec3(1.));
col *= 0.7;
fragColor = vec4(col, 1.0);
}
</script>
</head>
<body>
<canvas id="canvas" class="overlay" width="480" height="288"></canvas>
<div class="overlay" id="guindaille" hidden>
<video id="guindaille-video">
<source src="res/guindaille.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="sacha" hidden>
<video id="sacha-video">
<source src="res/sacha.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="infeau" hidden>
<video id="infeau-video">
<source src="res/infeau.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="decompte" hidden>
<video id="decompte-video">
<source src="res/decompte.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="koty" hidden>
<video id="koty-video">
<source src="res/kotyledon.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="photo" hidden>
<video id="photo-video">
<source src="res/photokot.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="organe" hidden>
<video id="organe-video">
<source src="res/video-sponsors.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="certyno" hidden>
<video id="certyno-video">
<source src="res/certino.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="carpe" hidden>
<video id="carpe-video">
<source src="res/24h_reels.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="carpe2" hidden>
<video id="carpe2-video">
<source src="res/24h_reels_2.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="circo" hidden>
<video id="circo-video">
<source src="res/circus.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="electro" hidden>
<video id="electro-video">
<source src="res/electro.mp4" type="video/mp4">
</video>
</div>
<div class="overlay" id="cse-vid" hidden>
<video id="cse-video">
<source src="res/boucle-ecrans-geants-low_compressed.mp4" type="video/mp4">
</video>
</div>
<div class="overlay ambulance" id="112" hidden></div>
<div class="overlay linux" id="linux" hidden></div>
<div class="overlay kotan" id="kotan" hidden></div>
<div class="overlay aubergine" id="kapvert" hidden></div>
<div class="overlay jour" id="lineupjour" hidden></div>
<div class="overlay nuit" id="lineupnuit" hidden></div>
<div class="overlay belgique" id="verdom" hidden></div>
<div class="overlay naruto" id="manga" hidden></div>
<div class="overlay dejeuner" id="fairkot" hidden></div>
<div class="overlay cse-warning" id="cse-warning" hidden>
<h3>⚠️Avertissement du CSE⚠️</h3>
<h1 id="cse-warning-text"></h1>
</div>
<div class="overlay cse-warning" id="cse-edit-warning" hidden>
<h3>Modifier l'avertissement du CSE</h3>
<input type="text" id="cse-warning-input" value="Ceci est un message de test"></input>
<button onclick="big_screen.change_state('c')">Afficher le message</button>
</div>
<div class="overlay bsod" id="bsod" hidden>
</div>
</body>
</html>