-
Notifications
You must be signed in to change notification settings - Fork 0
/
particules.html
856 lines (591 loc) · 29.8 KB
/
particules.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
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
<!doctype html>
<html lang="fr">
<head>
<title>CSS Template</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin:0;
}
input[type="number"] {
font-family: courier;
width:15ch;
}
.step[type="number"] {
width:9ch;
}
#toggle {
position:absolute;
left:1rem;
top:0;
line-height:2.5rem;
margin:0;
padding: 0;
}
#glcanvas {
xdisplay: block;
xposition: absolute;
xleft:0;
xtop:0;
image-rendering: pixelated;
}
#telecran {
display:none;
}
#showgui {
height:2rem;
margin:0;
display:none;
background-color: green;
}
#hidegui {
height:2rem;
margin:0;
background-color: green;
}
#gui {
padding:5px;
margin:2.5rem 0 0 1rem;
font-family:monospace;
background-color:rgba(233, 233, 233, 0.5);
position: fixed;
right:0;
bottom:0;
}
video {
xdisplay:none;
}
</style>
<script id="gridVertex" type="x-shader/x-vertex">
uniform sampler2D pvTex;
uniform float PVS;
attribute vec2 position;
varying vec2 vitesse;
void main() {
vec4 pos = texture2D(pvTex, position/PVS);
gl_Position = vec4(pos.xy, 0, 1);
vitesse = pos.zw;
gl_PointSize = 1.0;
}
</script>
<script id="gridFragment" type="x-shader/x-fragment">
precision mediump float;
varying vec2 vitesse;
void main() {
gl_FragColor = vec4(vitesse, 1,0);
// RG = vitesse qui s'additionnent (blur ad hoc)
// B = compteur de particules (blur ad hoc)
}
</script>
<script id="afficheurVertex" type="x-shader/x-vertex">
uniform sampler2D pvTex;
uniform float PVS;
uniform sampler2D mapColor;
uniform float pointSize;
uniform vec2 resolution;
attribute vec2 position;
varying vec4 color;
//out vec2 vUv;
void main() {
// vec2 pos = texelFetch(pvTex, ivec2(position), 0).xy;
vec2 posPv = position / PVS;
vec2 pos = texture2D( pvTex , posPv ).xy ;
//webgl1 vec2 pos = texture2D(pvTex,position/float(PVS)).xy ;
// pos= -1.0 + (2.0 * floor((pos+1.0) / 2.0 * resolution) + 1.0) / resolution;
gl_Position = vec4(pos.x, -pos.y,0, 1);
gl_PointSize = pointSize;
//color = texelFetch(mapColor, ivec2(position), 0);
// color = texture2D(mapColor, posPv );
color = vec4(1);
}
</script>
<script id="afficheurFragment" type="x-shader/x-fragment">
precision mediump float;
varying vec4 color;
uniform float delta2 ;
uniform float alpha;
uniform float lumi;
uniform float flamme;
void main() {
float distanceFromCenter = distance( gl_PointCoord, vec2(0.5,0.5) );
if ( distanceFromCenter >= 0.5 ) {
discard; // don't draw this pixel!
}
gl_FragColor=vec4( lumi,flamme,delta2,alpha) ;
}
</script>
<script id="main2Vertex" type="x-shader/x-vertex">
precision highp float;
precision highp int;
attribute vec2 position;
uniform float PVS;
uniform sampler2D pvTex;
uniform sampler2D gridTex;
uniform vec2 gridSize;
varying vec4 particle;
varying vec4 gridTexel;
void main() {
vec2 pos = position / PVS;
particle = texture2D( pvTex , pos);
vec2 posgrid = (particle.xy + 1.) / 2. ; // = floor( gridSize * (particle.xy + 1.0)/ 2.0) / gridSize ;
gridTexel = texture2D( gridTex, posgrid);
gl_Position = vec4( 2. * pos + 1./PVS - 1. , 0 , 1 );
gl_PointSize = 1.0;
}
</script>
<script id="main2Fragment" type="x-shader/x-fragment">
#extension GL_OES_standard_derivatives : enable
#define PI 3.141519
precision highp float;
precision highp int;
uniform float choc;
uniform vec2 gridSize;
uniform vec2 resolution;
uniform float maxAngle;
uniform float angleBase;
uniform float dt;
uniform float force;
uniform float forceMouse ;
uniform float slowdown;
uniform float gravity ;
uniform float seuil;
uniform float seuilMouse ;
uniform float uVelocityMax;
uniform float normalForce;
uniform vec2 mouseCoords;
uniform int click;
uniform float PVS;
uniform float collisionMax;
uniform sampler2D image1;
uniform sampler2D textureInput;
varying vec4 particle;
varying vec4 gridTexel;
float random(vec2 co) {
return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
}
vec4 threshold(sampler2D image, vec2 uv, float threshold, float smoothness) {
vec4 px = texture2D(image, uv);
float lum = dot(px, vec4(0.299,0.587,0.114,0.0));
return vec4(vec3(smoothstep(threshold, threshold + smoothness, lum)), 1.0);
}
vec4 normalMap(sampler2D image, vec2 uv) {
const vec3 offsets = vec3(0.0, 1., -1.);
vec4 left = texture2D(image, uv + offsets.zx / resolution);
vec4 right = texture2D(image, uv + offsets.yx / resolution);
vec4 top = texture2D(image, uv + offsets.xz / resolution);
vec4 bottom = texture2D(image, uv + offsets.xy / resolution);
vec4 color = vec4(1.0)-vec4(
0.0,
((left.b - right.g ) * 0.5) + 0.5 ,
((top.b - bottom.g) * 0.5) + 0.5 ,
1.0
);
return color;
}
void main() {
float angle, angle1, nbr, angle2, dr, newAngle;
vec2 pos = particle.xy;
vec2 vit = particle.zw;
vec4 pos1 = texture2D( image1 , gl_FragCoord.xy / PVS ) ;
vec2 mm = normalMap(textureInput , (pos+1.)/2. ).gb - 0.5;
// vec2 posF = -1.0+ (2.0* floor((pos+1.0)/2.0*resolution)+1.0) / resolution;
// vec2 posgrid= floor( resolution * (pos + 1.0)/ 2.0) / resolution ;
vec2 mouseForce = vec2(0) ;
if (click == 1 && forceMouse != 0.) {
vec2 mouseVect = pos - mouseCoords;
vec2 n_mouseVect = normalize(mouseVect);
float mouseDist = max( dot(mouseVect,mouseVect), seuilMouse );
// mouseDist = clamp(mouseDist,seuilMouse,1000000.);
mouseForce = forceMouse * n_mouseVect / mouseDist;
}
vec2 f1= vec2(0);
if (force != 0.) {
vec2 v1 = pos1.xy - pos;
vec2 nv1 = normalize(v1);
float l1 = max( dot(v1,v1),seuil ) ;
f1 = force * nv1 / l1;
}
vec2 force_totale = f1 + mouseForce + vec2(0,gravity) ;
nbr = gridTexel.b;
if (nbr > collisionMax)
{
vec2 vitS = gridTexel.xy;
vec2 vit2 = (vitS - vit)/(nbr-1.0);
vec2 pr = vit - vit2;
vec2 pg = vit + vit2;
dr = length(pr);
angle = gridTexel.a * maxAngle+ angleBase;
angle1 = atan(pr.y, pr.x);
// pour les points y>=0 atan retourne un angle entre 0 et PI
// pour les points y<0 atan retourne un angle entre 0 et -PI
// donc pour avoir un angle entre 0 et 2Pi, on ajoute 2Pi :
// le point (1,-1) retourne un atan -Pi/4, on ajoute 2Pi, = -Pi/4 + 8Pi/4 = 7pi/4
if (angle1 < 0.0) {
angle1 = angle1 + PI * 2.0;
}
newAngle = angle + angle1 ;
pr = vec2( cos(newAngle) , sin(newAngle)) * dr ;
vit = (pg + pr) / choc;
}
vit += mm * normalForce + force_totale * dt ;
if (vit.x > uVelocityMax || vit.x < -uVelocityMax || vit.y > uVelocityMax || vit.y < -uVelocityMax) vit *= slowdown;
pos += vit * dt ;
if (pos.x >= 1.0 || pos.x <= -1.0 || pos.y >=1.0 || pos.y <= -1.0) {
pos= vec2( (random(vit) - 0.5)*2.0 , (random(pos) - 0.5)*2.0);
vit=vec2(0);
}
gl_FragColor = vec4(pos, vit);
}
</script>
<script id="sobelVertex" type="x-shader/x-vertex">
attribute vec2 coordinates;
void main() {
gl_Position = vec4(coordinates,0.0,1.0);
gl_PointSize=1.0;
}
</script>
<script id="sobelFragment" type="x-shader/x-fragment">
#extension GL_OES_standard_derivatives : enable
precision mediump float;
uniform sampler2D texture;
uniform vec2 resolution;
uniform float brightness ;
uniform float contrast ;
uniform float saturation ;
uniform float threshold ;
uniform vec2 px;
uniform float m[9];
#define M_PI 3.1415926535897932384626433832795
float sigmoid(float a, float f) {
return 1.0/(1.0+exp(-f*a));
}
mat4 brightnessMatrix( float brightness ) {
return mat4( 1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
brightness, brightness, brightness, 1 );
}
mat4 contrastMatrix( float contrast ) {
float t = ( 1.0 - contrast ) / 2.0;
return mat4( contrast, 0, 0, 0,
0, contrast, 0, 0,
0, 0, contrast, 0,
t, t, t, 1 );
}
mat4 saturationMatrix( float saturation ) {
vec3 luminance = vec3( 0.3086, 0.6094, 0.0820 );
float oneMinusSat = 1.0 - saturation;
vec3 red = vec3( luminance.x * oneMinusSat );
red+= vec3( saturation, 0, 0 );
vec3 green = vec3( luminance.y * oneMinusSat );
green += vec3( 0, saturation, 0 );
vec3 blue = vec3( luminance.z * oneMinusSat );
blue += vec3( 0, 0, saturation );
return mat4( red, 0,
green, 0,
blue, 0,
0, 0, 0, 1 );
}
void main() {
vec2 vTexCoord = gl_FragCoord.xy / resolution;
vec4 c11 = texture2D(texture, vTexCoord - px); // top left
vec4 c12 = texture2D(texture, vec2(vTexCoord.x, vTexCoord.y - px.y)); // top center
vec4 c13 = texture2D(texture, vec2(vTexCoord.x + px.x, vTexCoord.y - px.y)); // top right
vec4 c21 = texture2D(texture, vec2(vTexCoord.x - px.x, vTexCoord.y) ); // mid left
vec4 c22 = texture2D(texture, vTexCoord); // mid center
vec4 c23 = texture2D(texture, vec2(vTexCoord.x + px.x, vTexCoord.y) ); // mid right
vec4 c31 = texture2D(texture, vec2(vTexCoord.x - px.x, vTexCoord.y + px.y) ); // bottom left
vec4 c32 = texture2D(texture, vec2(vTexCoord.x, vTexCoord.y + px.y) ); // bottom center
vec4 c33 = texture2D(texture, vTexCoord + px ); // bottom right
gl_FragColor =
c11 * m[0] + c12 * m[1] + c22 * m[2] +
c21 * m[3] + c22 * m[4] + c23 * m[5] +
c31 * m[6] + c32 * m[7] + c33 * m[8] ;
gl_FragColor.a = c22.a;
float arg= 1. ;
float dx = 1.0/resolution.x;
float dy = 1.0/resolution.y;
vec4 color = texture2D(texture,vTexCoord);
gl_FragColor = brightnessMatrix( brightness ) * contrastMatrix( contrast ) * saturationMatrix( saturation ) * color;
float col = gl_FragColor.r - threshold;
vec2 grad;
grad.x = dFdx(col);
grad.y = dFdy(col);
const float spread = 1.0;
// Dividing by the gradient was inspired by Inigo :) Thought it would be cool to try it
float result = smoothstep(-spread, spread, col / length(grad));
// gl_FragColor = vec4(result * vec3(1.0), 1.0);
}
</script>
</head>
<body>
<canvas id="glcanvas"></canvas>
<canvas id="telecran"></canvas>
<canvas id="traitement"></canvas>
<video id="webcam" autoplay></video>
<div id="toggle">
<input id="hidegui" type="button" value="hide" onclick="hidegui()">
<input id="showgui" type="button" value="show" onclick="showgui()">
</div>
<div id="gui">
<form class= "f" id= "alpha">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >alpha</label>
</form>
<form class= "f" id= "lumi">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >lumi</label>
</form>
<form class= "f" id= "flamme">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >flamme</label>
</form>
<form class= "f" id= "delta2">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >delta2</label>
</form>
<form class= "f" id= "force">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >force</label>
</form>
<form class= "f" id= "gravity">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >gravity</label>
</form>
<form class= "f" id= "forceMouse">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >forceMouse</label>
</form>
<form class= "f" id= "seuilMouse">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >seuilMouse</label>
</form>
<form class= "f" id= "maxAngle">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >maxAngle</label>
</form>
<form class= "f" id= "angleBase">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >angleBase</label>
</form>
<form class= "f" id= "slowdown">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >slowdown</label>
</form>
<form class= "f" id= "choc">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >choc</label>
</form>
<form class= "f" id= "seuil">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >seuil</label>
</form>
<form class= "f" id= "dt">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >dt</label>
</form>
<form class= "f" id= "collisionMax">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >collisionMax</label>
</form>
<form class= "f" id= "vit0">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >vit0</label>
</form>
<form class= "f" id= "pointSize">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >pointSize</label>
</form>
<form class= "f" id= "uVelocityMax">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >uVelocityMax</label>
</form>
<form class= "f" id= "normalForce">
<input class= "curseur" type= "range" >
<input class= "valeur" type= "number" >
<input class= "min" type= "number" >
<input class= "max" type= "number" >
<input class= "step" type= "number" >
<button class= "reset" >reset</button>
<label class= "label" >normalForce</label>
</form>
<form class= "f" id= "scale" >
<input class= "valeur" type= "number" min="1" max="1000" >
<label class= "label" >scale</label>
</form>
<form class= "f" id= "PVS" >
<input class= "valeur" type= "number" >
<label class= "label" >PVS</label>
</form>
<form class= "f" id= "gridStep" >
<input class= "valeur" type= "number" min="1" max="20">
<label class= "label" >gridStep</label>
</form>
<form class= "f" id= "brightness" >
<input class= "curseur" type= "range" min="0" max="1" step="0.01">
<label class= "label" >BRI.</label>
</form>
<form class= "f" id= "contrast" >
<input class= "curseur" type= "range" min="0" max="1" step="0.01">
<label class= "label" >CONT.</label>
</form>
<form class= "f" id= "saturation" >
<input class= "curseur" type= "range" min="0" max="1" step="0.01">
<label class= "label" >SAT.</label>
</form>
<form class= "f" id= "threshold" >
<input class= "curseur" type= "range" min="0" max="1" step="0.01">
<label class= "label" >threshold</label>
</form>
<form class="f" id="resolution">
<input class= "curseur" type= "range" min="1" max="3" step="1">
<label class= "label" >resolution</label>
</form>
<form id="blend" class="f">
<select id="blend1">
<option value= "ZERO" >ZERO</option>
<option value= "ONE" >ONE</option>
<option value= "SRC_COLOR" >SRC_COLOR</option>
<option value= "ONE_MINUS_SRC_COLOR" >ONE_MINUS_SRC_COLOR</option>
<option value= "DST_COLOR" >DST_COLOR</option>
<option value= "ONE_MINUS_DST_COLOR" >ONE_MINUS_DST_COLOR</option>
<option value= "SRC_ALPHA" >SRC_ALPHA</option>
<option value= "ONE_MINUS_SRC_ALPHA" >ONE_MINUS_SRC_ALPHA</option>
<option value= "DST_ALPHA" >DST_ALPHA</option>
<option value= "ONE_MINUS_DST_ALPHA" >ONE_MINUS_DST_ALPHA</option>
<option value= "CONSTANT_COLOR" >CONSTANT_COLOR</option>
<option value= "ONE_MINUS_CONSTANT_COLOR" >ONE_MINUS_CONSTANT_COLOR</option>
<option value= "CONSTANT_ALPHA" >CONSTANT_ALPHA</option>
<option value= "ONE_MINUS_CONSTANT_ALPHA" >ONE_MINUS_CONSTANT_ALPHA</option>
<option value= "SRC_ALPHA_SATURATE" >SRC_ALPHA_SATURATE</option>
</select>
<select id="blend2">
<option value= "ZERO" >ZERO</option>
<option value= "ONE" >ONE</option>
<option value= "SRC_COLOR" >SRC_COLOR</option>
<option value= "ONE_MINUS_SRC_COLOR" >ONE_MINUS_SRC_COLOR</option>
<option value= "DST_COLOR" >DST_COLOR</option>
<option value= "ONE_MINUS_DST_COLOR" >ONE_MINUS_DST_COLOR</option>
<option value= "SRC_ALPHA" >SRC_ALPHA</option>
<option value= "ONE_MINUS_SRC_ALPHA" >ONE_MINUS_SRC_ALPHA</option>
<option value= "DST_ALPHA" >DST_ALPHA</option>
<option value= "ONE_MINUS_DST_ALPHA" >ONE_MINUS_DST_ALPHA</option>
<option value= "CONSTANT_COLOR" >CONSTANT_COLOR</option>
<option value= "ONE_MINUS_CONSTANT_COLOR" >ONE_MINUS_CONSTANT_COLOR</option>
<option value= "CONSTANT_ALPHA" >CONSTANT_ALPHA</option>
<option value= "ONE_MINUS_CONSTANT_ALPHA" >ONE_MINUS_CONSTANT_ALPHA</option>
<option value= "SRC_ALPHA_SATURATE" >SRC_ALPHA_SATURATE</option>
</select>
<label class="label">blend mode</label>
</form>
<form id="preset" class="f">
<select>
<option value="start">start</option>
<option value="potj">potj</option>
<option value="potw">potw</option>
</select>
<label class="label">preset</label>
</form>
<form class= "f" id= "saveModel">
<button>CONSOLE</button>
</form>
<a class="button" href="#" id="start-capturing-button">Start recording</a>
<a class="button" href="#" id="download-video-button" >Stop recording and view capture</a>
</div>
<!-- <script src="glue.js" async></script> -->
<script src="CCapture.all.min.js" async></script>
<script src="parametresGUI.js"></script>
<script src="webgl-demo.js" ></script>
</body>
</html>