-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsite.js
1397 lines (1137 loc) · 51 KB
/
site.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
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
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
var f;
var fbig;
var ctx;
var btnImg;
var rscManager;
// -- SITE FUNCTION/CLASS --
function page1 (ctx) {
var p = page({ctx: ctx, title: "ACCUEIL"}); // scrollSpeed: 16
var sp = page({ctx: ctx})
var t = textWidget({
text: "JE SUIS FREDDY\nJ'AI 27 ANS\nJE FAIS DES JEUX VIDEOS",
relPos: {x: 45, y: 30},
font: fbig,
});
var t2 = textWidget({
text: "Clique sur les boutons en haut a droite et t'en sauras plus.",
relPos: {x: 42, y: 120},
font: f,
});
//var i = imageWidget({ctx: ctx, image: rscManager.getRscData("awesome"), relPos: {x: 0, y: 200}});
sp.addWidget(t);
sp.addWidget(t2);
//sp.addWidget(i);
var sc = scrollableContainer({ctx: ctx, widget: sp, size: {w: 290, h: 180}})
p.onGoTo = function () {
siteCanvas.getBGManager().setBGOpacity(0);
};
// delete on commente ca si tu veux plus du bg random au switch
p.onLeave = function () {
siteCanvas.getBGManager().switchBG(3 + Math.floor(Math.random() * (siteCanvas.getBGManager().bgList.length-3)), true);
};
p.addWidget(sc);
return p;
}
function page2 (ctx) {
var p = page({ctx: ctx, title: "PROJETS"});
var ps = pagePanelScroll({ctx: ctx, title: "PROJETS", size: {w: 290, h: 180}});
var animSprSh = spritesheet({ctx: ctx, image: rscManager.getRscData("small-arrow-animated"), nbFrameW: 4, nbFrameH: 1});
var arrowWidget = animatedImageWidget({ctx: ctx, sprSh: animSprSh, startFrame: 0, nbFrame: 2, animSpeed: 10, parent: ps, relPos: {x: 0, y: 168}})
// "A videogame about hate and shit set in a medieval dystopian universe.\nPrototype made in 2 days during a game jam.\nBuilt on Unreal Engine 4."
ps.addPanels([panel({ctx: ctx, title: "SHITTY HOLLOW", image: rscManager.getRscData("shittyhollow"), iconsList: ["unreal"], font: fbig, descfont: f,
desc: "Un jeu de combat medieval dystopique, abordant avec passion et energie\nles themes societaux de la haine et du caca.\n\nPrototype cree en 2 jours lors d'une game jam, avec le reste du\ncollectif d'avenir RIX.\n\nConstruit via l'Unreal Engine 4."}),
panel({ctx: ctx, title: "BISOUNOURS PARTY", image: rscManager.getRscData("bp"), iconsList: ["sourcefilmmaker", "maya", "premiere"], font: fbig, descfont: f, url: "https://www.youtube.com/watch?v=q2IK2M-9yV8",
desc: "Mod multijoueur pour Half-Life 2 sorti en 2009 puis laisse a l'abandon,\navant d'etre recupere par Louis \"Orygin\" Gueuten et moi-meme\nafin de lui donner les correctifs qu'il meritait.\n\nJ'ai realise l'integralite du trailer pour ce projet, de l'ecriture\nau montage en passant par l'animation, sous Source Filmmaker."}),
panel({ctx: ctx, title: "SUBTLETY REIGNS", image: rscManager.getRscData("bp"), iconsList: ["unreal"], font: fbig, descfont: f, url: "https://forums.unrealengine.com/unreal-engine/events/97432-epic-megajam-submission-thread/page9?124973-Epic-MegaJam-Submission-Thread=&viewfull=1",
desc: "Une experimentation a deux joueurs realisee durant la Epic Game Jam 2016.\n\nVous incarnez deux animaux capitalistes jouant a celui qui investira le plus\nd'alcool dans son gosier sans lacher son dejeuner.\n\nDeveloppe en 7 jours par 5 personnes mi-temps sous Unreal.\n\nDe nombreuses bouteilles de biere on ete brutalisees au cours de la\ncreation de ce jeu."}),
panel({ctx: ctx, title: "THE FRIENDZONE", image: rscManager.getRscData("the-friendzone"), iconsList: ["unity"], font: fbig, descfont: f, url: "http://ludumdare.com/compo/ludum-dare-35/?action=preview&uid=56299",
desc: "Une experimentation realisee durant la game jam Ludum Dare 35.\n\nElle met en scene deux amis partageant la meme couchette,\nl'un ayant le sommeil agite et l'autre, controle par le joueur,\ndevant s'eloigner le plus possible de son camarade afin de ne\npas rendre leur relation \"etrange\"...\n\nDeveloppe en 2 jours par 3 personnes sous Unity.\nCe \"jeu\" termina a la 11e place de la LD, categorie Humour."}),
panel({ctx: ctx, title: "ARROWS IN CHAINS", image: rscManager.getRscData("arrows"), iconsList: ["pico8"], font: fbig, descfont: f, url: "http://www.lexaloffle.com/bbs/?tid=3492",
desc: "Petite experimentation realisee durant la Pico-8 Jam #2,\nen une semaine, dont le theme etait Chain Reaction.\n\nIl s'agit de declencher la plus grande reaction en chaine,\nen selectionnant les cases d'une grille.\nChaque case correspondant a une fleche qui revelera celle\nvers laquelle la fleche pointe, et ainsi de suite."}),
panel({ctx: ctx, title: "KEBAB SIMULATOR (PROTOTYPE)", image: rscManager.getRscData("kebab"), iconsList: ["c", "msdos"], font: fbig, descfont: f,
desc: "Prototype/exercice realise dans le but d'apprendre\nle developpement de jeux videos \"a l'ancienne\" sous MS-DOS,\nen plus de m'interesser aux contraintes et problematiques\nqu'imposent les environnements et systemes de cette epoque.\n\nProgramme en C sous Turbo-C, avec l'aide seule de dos.h,\ndiverses bibliotheques standards, ainsi que DOSBox pour l'execution."}),
panel({ctx: ctx, title: "LE DEFILE", image: rscManager.getRscData("kebab"), iconsList: ["maya"], font: fbig, descfont: f, url: "https://vimeo.com/43393070",
desc: "Projet intensif de court metrage d'animation realise en 3 semaines.\n\nJ'ai modelise, rigge, texture, anime, et rendu integralement l'un des\n3 personnages de ce court metrage, ainsi qu'effectue le compositing\nsous After Effects.\n\nRealise au sein d'une equipe de 3 personnes, rendu sous Mental Ray."}),
panel({ctx: ctx, title: "PROCESS", image: rscManager.getRscData("kebab"), iconsList: ["maya", "python"], font: fbig, descfont: f, url: "https://vimeo.com/60968169",
desc: "Projet intensif de court metrage d'animation realise en 3 semaines.\n\nJ'ai modelise les patrons en papier, effectue leur setup via un auto-rig\nprogramme pour l'occasion, puis anime leur pliage et assemblage pour\nformer la machine.\n\nRealise au sein d'une equipe de 5 personnes, rendu sous Mental Ray"})]);
ps.panelList[0].showImage = false;
hideVid = function () {
siteCanvas.getBGManager().bgList[2].setVideo();
this.showImage = true;
}
ps.panelList[0].onGoTo = function () {
siteCanvas.getBGManager().bgList[2].setVideo("media/shittyhollow.mov");
this.showImage = false;
}
ps.panelList[1].onGoTo = function () {
siteCanvas.getBGManager().bgList[2].setVideo("media/bp.mp4");
this.showImage = false;
}
ps.panelList[2].onGoTo = function () {
siteCanvas.getBGManager().bgList[2].setVideo("media/subtlety-reigns.mp4");
this.showImage = false;
}
ps.panelList[3].onGoTo = function () {
siteCanvas.getBGManager().bgList[2].setVideo("media/the-friendzone.mov");
this.showImage = false;
}
ps.panelList[4].onGoTo = function () {
siteCanvas.getBGManager().bgList[2].setVideo("media/arrows.mov");
this.showImage = false;
}
ps.panelList[5].onGoTo = function () {
siteCanvas.getBGManager().bgList[2].setVideo("media/kebab.mov");
this.showImage = false;
}
ps.panelList[6].onGoTo = function () {
siteCanvas.getBGManager().bgList[2].setVideo("media/le-defile.mov");
this.showImage = false;
}
ps.panelList[7].onGoTo = function () {
siteCanvas.getBGManager().bgList[2].setVideo("media/process.mov");
this.showImage = false;
}
//ps.panelList[2].onGoTo = hideVid;
p.onGoTo = function () {
siteCanvas.getBGManager().switchBG(2, true);
siteCanvas.getBGManager().setBGOpacity(0);
};
p.onLeave = function () {
siteCanvas.getBGManager().switchBG(3 + Math.floor(Math.random() * (siteCanvas.getBGManager().bgList.length-3)), true);
};
var slidingPageWidget = slidingPage({ctx: ctx, parent: p, unfoldedRelPos: {x: 0, y: 20}, foldedRelPos: {x: 0, y: 180}, size: {w: 160, h: 180}});
var descPage = page({ctx: ctx});
var descTextWidget = textWidget({ctx: ctx, font: f, text: ps.panelList[0].desc, parent: descPage, relPos: {x: 10, y: 0}});
var dummy = dummyWidget({size: {w: 270, h: 165}, parent: p});
ps.onChange = function () {
descTextWidget.text = ps.panelList[ps.currPanel].desc;
}
var triggerSlidingPage = function () {
slidingPageWidget.triggerFold();
if (slidingPageWidget.unfolded) {
arrowWidget.setStartFrame(2);
siteCanvas.getBGManager().setBGOpacity(0.5);
}
else {
arrowWidget.setStartFrame(0);
siteCanvas.getBGManager().setBGOpacity(0);
}
}
dummy.onMouseDown = triggerSlidingPage;
arrowWidget.onMouseDown = triggerSlidingPage;
for (var i = 0; i < ps.panelList.length; i++) {
ps.panelList[i].textWidget.onMouseDown = triggerSlidingPage;
}
siteCanvas.registerWidgetForMouseHoverInput(arrowWidget);
arrowWidget.onStartMouseHover = function (mousePos) {
var bubbleWidget = ps.panelList[ps.currPanel].bubbleWidget;
arrowWidget.animSpeed = 5;
bubbleWidget.visible = true;
bubbleWidget.setText("Cliquer n'importe ou pour en savoir plus");
bubbleWidget.setRelPos(arrowWidget.relPos.x, arrowWidget.relPos.y-15);
}
arrowWidget.onEndMouseHover = function (mousePos) {
var bubbleWidget = ps.panelList[ps.currPanel].bubbleWidget;
arrowWidget.animSpeed = 10;
bubbleWidget.visible = false;
}
slidingPageWidget.setPage(descPage);
descPage.addWidget(descTextWidget);
p.addWidget(dummy);
p.addWidget(ps);
p.addWidget(slidingPageWidget);
p.addWidget(arrowWidget);
return p;
}
function page3 (ctx) {
p = page({ctx: ctx, title: "COMPETENCES"});
// Sliding detail page
var sp = slidingPage({ctx: ctx, parent: p, unfoldedRelPos: {x: 135, y: 0}, foldedRelPos: {x: 320, y: 0}, size: {w: 160, h: 180}});
var sp1 = textWidget({ctx: ctx, font: f, text: "", parent: sp1sc, relPos: {x: 0, y: 0}});
var sp1sc = scrollableContainer({ctx: ctx, widget: sp1, parent: sp, size: {w: 155, h: 180}});
var psp = page({ctx: ctx});
sp1sc.setWidget(sp1);
psp.addWidget(sp1sc)
sp.setPage(psp);
// Skillz widgetz
var gl = gridLayout({ctx: ctx, nbColumns: 2, nbRows: 1, spaceH: 5, spaceW: 5, maxWidth: 290, maxHeight: 180});
var s1 = skillWidget({ctx: ctx, title: "UNREAL", font: f, titleFont: fbig, image: rscManager.getRscData("unreal"), value: 3});
var s10 = skillWidget({ctx: ctx, title: "UNITY", font: f, titleFont: fbig, image: rscManager.getRscData("unity"), value: 3});
var s2 = skillWidget({ctx: ctx, title: "PYTHON", font: f, titleFont: fbig, image: rscManager.getRscData("python"), value: 4});
var s3 = skillWidget({ctx: ctx, title: "C", font: f, titleFont: fbig, image: rscManager.getRscData("c"), value: 3});
var s4 = skillWidget({ctx: ctx, title: "C++", font: f, titleFont: fbig, image: rscManager.getRscData("cpp"), value: 3});
var s5 = skillWidget({ctx: ctx, title: "MAYA", font: f, titleFont: fbig, image: rscManager.getRscData("maya"), value: 4});
var s6 = skillWidget({ctx: ctx, title: "PHOTOSHOP", font: f, titleFont: fbig, image: rscManager.getRscData("photoshop"), value: 4});
var s7 = skillWidget({ctx: ctx, title: "BLENDER", font: f, titleFont: fbig, image: rscManager.getRscData("blender"), value: 2});
var s8 = skillWidget({ctx: ctx, title: "JAVASCRIPT", font: f, titleFont: fbig, image: rscManager.getRscData("javascript"), value: 2});
var s9 = skillWidget({ctx: ctx, title: "AFTER FX", font: f, titleFont: fbig, image: rscManager.getRscData("after-effects"), value: 3});
s1.desc = "- utilisation extensive des blueprints pour\nla realisation de plusieurs projets dans\nle cadre de plusieurs game jams et autres\nprojets collectifs et personnels\n\n- connaissance sommaire mais operationnelle\ndu langage de programmation nodale de\nshaders"
s10.desc = "- realisation des scripts du jeu\nThe Friendzone pour la Ludum Dare 35\n\n- Prototype complet et fonctionnel\nd'un jeu de basket tire de la serie animee\nAngelo la Debrouille, pour TeamTO.\n\n- Integration/testing/polish a Emissive sur\ndes projets pour divers clients tels que la\nSNCF, la Fondation de la Haute Horlogerie,\nHermes...\n\n- integration d'un emulateur Macintosh\nsous forme de plugin avec rendu du\nframebuffer en texture et gestion des\ninputs souris/clavier"
s2.desc = "- maitrise du langage pour scripts\nponctuels et applications completes\n\n- maitrise des concepts de POO au sein de\nPython\n\n- a maintenu et largement etendu un\npipeline complet de production d'une serie\nanimee sous maya 2012\n\n- a developpe quelques wrappers et\nbibliotheques facilitant l'utilisation et\nl'unification des systemes\n(assets manager, render manager...)\nutilises en interne lors de cette prod.\n\n- developpement de nombreux outils avec\ninterface graphique bases sur ces libs"
s3.desc = "- bases solides en programmation C.\n\n- a developpe quelques routines graphiques\nayant permis la realisation d'un petit\nprototype de jeu pour MS-DOS.\n"
s4.desc = "- maitrise des concepts de programmation\nobjet\n\n- a developpe un prototype de controleur\nMIDI virtuel utilisant le trackpad d'un\nMacBook Pro, sous openFrameworks et\nXCode.\n\n- developpement d'un moteur de jeu\ncomplet et multi-plateforme, utilise\nnotamment pour \"TLG Simulator\""
s5.desc = "- maitrise de l'interface\n\n- maitrise de l'API Python\n\n- a developpe, maintenu, et fait evoluer un\npipeline de serie d'animation 3D\n\n- maitrise des outils et workflows de\nmodelisation et d'animation\n\n- connaissances en setup/rigging\n\n- connaissances en rendu Mental Ray\n\n- a contribue a la realisation de 2 projets\nintensifs etudiants rendus sous Mental Ray\n\n- a realise 2 courts etudiants complets\nsous Mental Ray"
s6.desc = "- maitrise de l'interface et des outils\n\n- pratique de la retouche photo\n(plutot sur Lightroom, certes)\n\n- relativement a l'aise en texturing\n\n- quelques notions en digital painting"
s7.desc = "- maitrise des workflows de\nmodelisation, texturing, rigging et rendu\n(sous Cycles et Blender Render)\n\n- a effectue une mission de mode/retopo,\nanimation et rendu de pieces mecaniques\n\n- utilise pour cleaner et retexturer un\nscan 3D de corps humain pour un court\nmetrage rendu sous Unreal\n\n- devenu mon outil principal pour tout\nbesoin de modelisation/paint 3D depuis 2016\n\n- en vrai Maya c'etait pas SI bien"
s8.desc = "- apprentissage conjoint a la realisation\nen quelques semaines de ce site et de son\nsysteme de contenu."
s9.desc = "- maitrise de l'interface\n\n- confortable avec les expressions\n\n- utilise pour la post-production et les\nanimations de tous les projets,\nd'integration, de compositing ou\nd'animation realises ces dernieres annees."
gl.addWidget(s1);
gl.addWidget(s10);
gl.addWidget(s2);
gl.addWidget(s3);
gl.addWidget(s4);
gl.addWidget(s5);
gl.addWidget(s7);
gl.addWidget(s6);
gl.addWidget(s9);
gl.addWidget(s8);
var sc = scrollableContainer({ctx: ctx, widget: gl, size: {w: 290, h: 180}});
var onSkillMouseDown = function () {
sp1.text = this.desc;
sp1.updateSize();
sp1.updateRect();
sp1sc.updateSize();
sp1sc.updateRect();
sp1sc.updateOverflow();
this.setRelPos(this.relPos.x - this.offsetX, this.relPos.y)
this.wiggle = false;
this.offsetX = 0.;
if (gl.selectedWidget == this || gl.selectedWidget == null) {
sp.triggerFold();
gl.setNbColumns((gl.nbColumns % 2) + 1);
sc.setSize(gl.size.w+25, sc.size.h)
}
if (gl.selectedWidget != null) {
gl.selectedWidget.isSelected = false;
gl.selectedWidget.setRelPos(gl.selectedWidget.relPos.x - gl.selectedWidget.offsetX, gl.selectedWidget.relPos.y);
gl.selectedWidget.offsetX = 0.;
gl.selectedWidget.setRelPos(gl.selectedWidget.relPos.x + gl.selectedWidget.offsetX, gl.selectedWidget.relPos.y);
}
if (sp.unfolded == false) {
gl.selectedWidget = null;
this.setRelPos(this.relPos.x - this.offsetX, this.relPos.y);
this.offsetX = 0.;
}
else {
gl.selectedWidget = this;
this.isSelected = true;
if (sc.overflow.y > 0) {
if (sc.size.h + sc.scrollPos.y < gl.selectedWidget.relPos.y && sc.size.h + sc.scrollPos.y < gl.selectedWidget.relPos.y) {
sc.gotoScrollPos({x: sc.scrollPos.x, y: Math.max(0, gl.selectedWidget.relPos.y - sc.size.h + gl.selectedWidget.size.h)})
}
}
var newRelPos = {x: this.relPos.x - this.offsetX + 10., y: this.relPos.y};
this.offsetX = 10.;
this.setRelPos(newRelPos.x, newRelPos.y);
}
}
var onSkillStartMouseHover = function () {
this.offsetX = 0.;
this.wiggle = true;
this.hoverStartTime = new Date().getTime();
}
var onSkillEndMouseHover = function () {}
s1.onMouseDown = onSkillMouseDown;
s10.onMouseDown = onSkillMouseDown;
s2.onMouseDown = onSkillMouseDown;
s3.onMouseDown = onSkillMouseDown;
s4.onMouseDown = onSkillMouseDown;
s5.onMouseDown = onSkillMouseDown;
s6.onMouseDown = onSkillMouseDown;
s7.onMouseDown = onSkillMouseDown;
s8.onMouseDown = onSkillMouseDown;
s9.onMouseDown = onSkillMouseDown;
siteCanvas.registerWidgetForMouseHoverInput(s1);
siteCanvas.registerWidgetForMouseHoverInput(s10);
siteCanvas.registerWidgetForMouseHoverInput(s2);
siteCanvas.registerWidgetForMouseHoverInput(s3);
siteCanvas.registerWidgetForMouseHoverInput(s4);
siteCanvas.registerWidgetForMouseHoverInput(s5);
siteCanvas.registerWidgetForMouseHoverInput(s6);
siteCanvas.registerWidgetForMouseHoverInput(s7);
siteCanvas.registerWidgetForMouseHoverInput(s8);
siteCanvas.registerWidgetForMouseHoverInput(s9);
s1.onStartMouseHover = onSkillStartMouseHover;
s10.onStartMouseHover = onSkillStartMouseHover;
s2.onStartMouseHover = onSkillStartMouseHover;
s3.onStartMouseHover = onSkillStartMouseHover;
s4.onStartMouseHover = onSkillStartMouseHover;
s5.onStartMouseHover = onSkillStartMouseHover;
s6.onStartMouseHover = onSkillStartMouseHover;
s7.onStartMouseHover = onSkillStartMouseHover;
s8.onStartMouseHover = onSkillStartMouseHover;
s9.onStartMouseHover = onSkillStartMouseHover;
s1.onEndMouseHover = onSkillEndMouseHover;
s10.onEndMouseHover = onSkillEndMouseHover;
s2.onEndMouseHover = onSkillEndMouseHover;
s3.onEndMouseHover = onSkillEndMouseHover;
s4.onEndMouseHover = onSkillEndMouseHover;
s5.onEndMouseHover = onSkillEndMouseHover;
s6.onEndMouseHover = onSkillEndMouseHover;
s7.onEndMouseHover = onSkillEndMouseHover;
s8.onEndMouseHover = onSkillEndMouseHover;
s9.onEndMouseHover = onSkillEndMouseHover;
var onLayoutResize = function () {
sc.updateOverflow();
if (sc.scrollPos.y > sc.overflow.y) {
sc.gotoScrollPos({x: sc.overflow.x, y: sc.overflow.y});
}
}
p.onGoTo = function () {
siteCanvas.getBGManager().setBGOpacity(0.5);
};
// delete on commente ca si tu veux plus du bg random au switch
p.onLeave = function () {
siteCanvas.getBGManager().switchBG(3 + Math.floor(Math.random() * (siteCanvas.getBGManager().bgList.length-3)), true);
};
gl.onResize = onLayoutResize;
p.addWidget(sc);
p.addWidget(sp);
return p;
}
function page4 (ctx) {
var p = page({ctx: ctx, scrollSpeed: 60, title: "EXPERIENCE PROFESSIONNELLE"});
var gl = gridLayout({ctx: ctx, nbColumns: 1, nbRows: 1, spaceH: 5, spaceW: 5, maxWidth: 290, maxHeight: 180});
var xp1 = expProWidget({
ctx: ctx,
companyName: "WHIRLPOOL",
title: "STAGIAIRE INFORMATIQUE\nDEVELOPPEMENT/MAINTENANCE",
desc: "Stage facultatif de 6 semaines.\n\nJ'ai effectue des missions de fabrication de nouvelles applications\nintranet en ASP.NET et effectue la migration de vieilles\napps ASP ainsi que leur maintenance.",
image: rscManager.getRscData("whirlpool"),
year1: 2009,
month1: 7,
year2: 2009,
month2: 8,
relPos: {x: 0, y: 240},
titleFont: fbig,
font: f,
});
var xp2 = expProWidget({
ctx: ctx,
companyName: "CHU AMIENS",
title: "STAGIAIRE R&D\nRECHERCHE BIOPHYSIQUE\nTRAITEMENT D'IMAGES IRM",
desc: "Stage obligatoire de fin d'etudes d'une duree de 4 mois.\n\nJ'y ai developpe un algorithme de voxelisation puis\nvectorisation automatique d'un arbre vasculaire cerebral,\ngenere a partir d'une serie d'image IRM.",
image: rscManager.getRscData("chu"),
year1: 2010,
month1: 4,
year2: 2010,
month2: 7,
relPos: {x: 0, y: 180},
titleFont: fbig,
font: f,
});
var xp3 = expProWidget({
ctx: ctx,
companyName: "SOLIDANIM",
title: "STAGIAIRE R&D\nTRAITEMENT D'IMAGES EN TEMPS REEL",
desc: "Stage obligatoire d'une duree de 3 mois.\n\nJ'y ai developpe un prototype d'algorithme de\ndeflicking d'images super-slow motion en temps reel, en\nutilisant C++, OpenCV, et les fonctionnalitees GPU de ce\ndernier.",
image: rscManager.getRscData("solidanim"),
year1: 2011,
month1: 6,
year2: 2011,
month2: 9,
relPos: {x: 0, y: 120},
titleFont: fbig,
font: f,
});
var xp4 = expProWidget({
ctx: ctx,
companyName: "TEAMTO",
title: "STAGIAIRE R&D\nDEVELOPPEMENT OUTILS\nGUS",
desc: "Stage obligatoire d'une duree de 3 mois.\n\nJ'ai effectue de multiples taches afin d'aider le quotidien\ndes graphistes sur diverses productions, delestant le travail\ndes developpeurs et data managers titulaires, que ce soit du\nsimple script Maya a l'amelioration des briques et outils du\npipeline historique de la societe.",
image: rscManager.getRscData("teamto"),
year1: 2012,
month1: 6,
year2: 2012,
month2: 8,
relPos: {x: 0, y: 60},
titleFont: fbig,
font: f,
});
var xp5 = expProWidget({
ctx: ctx,
companyName: "TEAMTO",
title: "Developpeur pipeline/Data manager\nPyjamasques Saison 1",
desc: "Durant toute la fabrication de la saison,\nJ'ai developpe divers outils pour les graphistes et mis\nen place l'ensemble du pipeline et automatisation de taches.",
image: rscManager.getRscData("teamto"),
year1: 2012,
month1: 11,
year2: 2015,
month2: 12,
relPos: {x: 0, y: 0},
titleFont: fbig,
font: f,
});
var xp6 = expProWidget({
ctx: ctx,
companyName: "EMISSIVE",
title: "Developpeur/Integrateur",
desc: "",
image: rscManager.getRscData("emissive"),
year1: 2016,
month1: 09,
year2: 2017,
month2: 04,
relPos: {x: 0, y: 0},
titleFont: fbig,
font: f,
});
var xp7 = expProWidget({
ctx: ctx,
companyName: "EVERYBODY ON DECK",
title: "Developpeur/Infographiste Freelance\n\"Pour pas etre seul\" de Theo Hoch",
desc: "Prestation pour un court metrage.\nJ'ai realise et rendu les parties CGI d'un film court\nmelant images de jeu video (rendues via Unreal) et\nfootage en prise de vue reelle.\n\nAu programme : construction de paysages via l'outil\nTerrain, modelisation/clean/texturing du perso a partir\ndu scan 3D de l'acteur principal (Vincent Macaigne) et\nanimation des cameras",
image: rscManager.getRscData("awesome-mini"),
year1: 2017,
month1: 06,
year2: 2017,
month2: 08,
relPos: {x: 0, y: 0},
titleFont: fbig,
font: f,
});
var xp8 = expProWidget({
ctx: ctx,
companyName: "DIVISION",
title: "Developpeur/Infographiste Freelance\nProjet en cours de realisation",
desc: "Prestation pour un clip sortant debut 2018.\nRealisation de rendus Unreal qui feront partie d'un montage\nde prises de vue reelle, avec quelques plans d'incrustation\nmelangeant realite et jeu video.",
image: rscManager.getRscData("awesome-mini"),
year1: 2017,
month1: 11,
year2: 2018,
month2: 01,
relPos: {x: 0, y: 0},
titleFont: fbig,
font: f,
});
var xp9 = expProWidget({
ctx: ctx,
companyName: "DONTNOD",
title: "Developpeur outils/pipeline",
desc: "",
image: rscManager.getRscData("dontnod"),
year1: 2018,
month1: 02,
year2: -1,
month2: -1,
relPos: {x: 0, y: 0},
titleFont: fbig,
font: f,
});
gl.addWidget(xp9);
gl.addWidget(xp8);
gl.addWidget(xp7);
gl.addWidget(xp6);
gl.addWidget(xp5);
gl.addWidget(xp4);
gl.addWidget(xp3);
gl.addWidget(xp2);
gl.addWidget(xp1);
var sc = scrollableContainer({ctx: ctx, widget: gl, size: {w: 290, h: 180}});
var resizeFunc = function () {
gl.updateWidgetsPos();
sc.updateRect();
sc.updateSize();
sc.updateOverflow();
}
xp9.onResize = resizeFunc;
xp8.onResize = resizeFunc;
xp7.onResize = resizeFunc;
xp6.onResize = resizeFunc;
xp5.onResize = resizeFunc;
xp4.onResize = resizeFunc;
xp3.onResize = resizeFunc;
xp2.onResize = resizeFunc;
xp1.onResize = resizeFunc;
// Mouse down event handlin'
var onExpProMouseDown = function () {
// Hiding all descriptions before showing the current one
for (var i = 0; i < gl.children.length; i++) {
if (gl.children[i].isDescriptionVisible && this != gl.children[i])
gl.children[i].hideDescription();
}
this.triggerDescription();
var imageWidget = this.children[0];
//imageWidget.setRelPos(imageWidget.relPos.x - this.offsetX, imageWidget.relPos.y)
imageWidget.rotation = 0.;
this.updateRect();
this.updateSize();
this.wiggle = false;
this.offsetX = 0.;
if (this.isDescriptionVisible && this.relPos.y + this.size.h > sc.size.h + sc.scrollPos.y) {
sc.gotoScrollPos({x: sc.scrollPos.x, y: this.relPos.y + this.size.h - sc.size.h});
}
}
// Mouse hover handlin'
var onExpProStartMouseHover = function () {
this.offsetX = 0.;
this.wiggle = true;
this.hoverStartTime = new Date().getTime();
}
var onExpProEndMouseHover = function () {}
siteCanvas.registerWidgetForMouseHoverInput(xp9);
siteCanvas.registerWidgetForMouseHoverInput(xp8);
siteCanvas.registerWidgetForMouseHoverInput(xp7);
siteCanvas.registerWidgetForMouseHoverInput(xp6);
siteCanvas.registerWidgetForMouseHoverInput(xp5);
siteCanvas.registerWidgetForMouseHoverInput(xp4);
siteCanvas.registerWidgetForMouseHoverInput(xp3);
siteCanvas.registerWidgetForMouseHoverInput(xp2);
siteCanvas.registerWidgetForMouseHoverInput(xp1);
xp9.onMouseDown = onExpProMouseDown;
xp8.onMouseDown = onExpProMouseDown;
xp7.onMouseDown = onExpProMouseDown;
xp6.onMouseDown = onExpProMouseDown;
xp5.onMouseDown = onExpProMouseDown;
xp4.onMouseDown = onExpProMouseDown;
xp3.onMouseDown = onExpProMouseDown;
xp2.onMouseDown = onExpProMouseDown;
xp1.onMouseDown = onExpProMouseDown;
xp9.onStartMouseHover = onExpProStartMouseHover;
xp8.onStartMouseHover = onExpProStartMouseHover;
xp7.onStartMouseHover = onExpProStartMouseHover;
xp6.onStartMouseHover = onExpProStartMouseHover;
xp5.onStartMouseHover = onExpProStartMouseHover;
xp4.onStartMouseHover = onExpProStartMouseHover;
xp3.onStartMouseHover = onExpProStartMouseHover;
xp2.onStartMouseHover = onExpProStartMouseHover;
xp1.onStartMouseHover = onExpProStartMouseHover;
xp9.onEndMouseHover = onExpProEndMouseHover;
xp8.onEndMouseHover = onExpProEndMouseHover;
xp7.onEndMouseHover = onExpProEndMouseHover;
xp6.onEndMouseHover = onExpProEndMouseHover;
xp5.onEndMouseHover = onExpProEndMouseHover;
xp4.onEndMouseHover = onExpProEndMouseHover;
xp3.onEndMouseHover = onExpProEndMouseHover;
xp2.onEndMouseHover = onExpProEndMouseHover;
xp1.onEndMouseHover = onExpProEndMouseHover;
p.onGoTo = function () {
siteCanvas.getBGManager().setBGOpacity(0.5);
};
// delete on commente ca si tu veux plus du bg random au switch
p.onLeave = function () {
siteCanvas.getBGManager().switchBG(3 + Math.floor(Math.random() * (siteCanvas.getBGManager().bgList.length-3)), true);
};
p.addWidget(sc);
return p;
}
function page5 (ctx) {
var p = page({ctx: ctx, scrollSpeed: 60, title: "ETUDES"});
var gl = gridLayout({ctx: ctx, nbColumns: 1, nbRows: 1, spaceH: 10, spaceW: 5, maxWidth: 290, maxHeight: 180});
var xp5 = expProWidget({
ctx: ctx,
companyName: "LYCEE DE LA COTE D'ALBATRE",
title: "Baccalaureat Scientifique option Sciences de l'Ingenieur\nDiplome obtenu - Mention Bien",
desc: "",
image: rscManager.getRscData("lycee"),
year1: 2005,
month1: 9,
year2: 2008,
month2: 6,
relPos: {x: 0, y: 120},
titleFont: fbig,
font: f,
});
var xp4 = expProWidget({
ctx: ctx,
companyName: "IUT AMIENS",
title: "Departement Informatique\nOption Imagerie Numerique",
desc: "Formation preparant aux metiers de l'informatique.\nJ'y ai perfectionne mes connaissances en programmation,\nsystemes d'information, et ai appris de nombreuses notions\nfondamentales pour l'imagerie numerique.",
image: rscManager.getRscData("iut"),
year1: 2008,
month1: 9,
year2: 2010,
month2: 6,
relPos: {x: 0, y: 60},
titleFont: fbig,
font: f,
});
var xp3 = expProWidget({
ctx: ctx,
companyName: "ATI - Paris VIII",
title: "Arts et Technologies de l'Image\nNiveau Master obtenu - Mention Bien",
desc: "Formation enseignant l'ensemble des etapes de fabrication\nd'un court metrage d'animation ou a effets speciaux, ainsi\nque la programmation Python/C++ dans le cadre du scripting\ndes logiciels de production ou de la realisation de jeux video.",
image: rscManager.getRscData("ati"),
year1: 2010,
month1: 6,
year2: 2013,
month2: 9,
relPos: {x: 0, y: 0},
titleFont: fbig,
font: f,
});
gl.addWidget(xp3);
gl.addWidget(xp4);
gl.addWidget(xp5);
var sc = scrollableContainer({ctx: ctx, widget: gl, size: {w: 290, h: 180}});
var resizeFunc = function () {
gl.updateWidgetsPos();
sc.updateRect();
sc.updateSize();
sc.updateOverflow();
}
xp3.onResize = resizeFunc;
xp4.onResize = resizeFunc;
xp5.onResize = resizeFunc;
// Mouse down event handlin'
var onExpProMouseDown = function () {
// Hiding all descriptions before showing the current one
for (var i = 0; i < gl.children.length; i++) {
if (gl.children[i].isDescriptionVisible && this != gl.children[i])
gl.children[i].hideDescription();
}
this.triggerDescription();
var imageWidget = this.children[0];
imageWidget.setRelPos(imageWidget.relPos.x - this.offsetX, imageWidget.relPos.y)
this.updateRect();
this.updateSize();
this.wiggle = false;
imageWidget.rotation = 0.;
if (this.isDescriptionVisible && this.relPos.y + this.size.h > sc.size.h + sc.scrollPos.y) {
sc.gotoScrollPos({x: sc.scrollPos.x, y: this.relPos.y + this.size.h - sc.size.h});
}
}
// Mouse hover handlin'
var onExpProStartMouseHover = function () {
this.offsetX = 0.;
this.wiggle = true;
this.hoverStartTime = new Date().getTime();
}
var onExpProEndMouseHover = function () {}
siteCanvas.registerWidgetForMouseHoverInput(xp3);
siteCanvas.registerWidgetForMouseHoverInput(xp4);
siteCanvas.registerWidgetForMouseHoverInput(xp5);
xp3.onMouseDown = onExpProMouseDown;
xp4.onMouseDown = onExpProMouseDown;
xp5.onMouseDown = onExpProMouseDown;
xp3.onStartMouseHover = onExpProStartMouseHover;
xp4.onStartMouseHover = onExpProStartMouseHover;
xp5.onStartMouseHover = onExpProStartMouseHover;
xp3.onEndMouseHover = onExpProEndMouseHover;
xp4.onEndMouseHover = onExpProEndMouseHover;
xp5.onEndMouseHover = onExpProEndMouseHover;
p.onGoTo = function () {
siteCanvas.getBGManager().setBGOpacity(0.5);
};
// delete on commente ca si tu veux plus du bg random au switch
p.onLeave = function () {
siteCanvas.getBGManager().switchBG(3 + Math.floor(Math.random() * (siteCanvas.getBGManager().bgList.length-3)), true);
};
p.addWidget(sc);
return p;
}
function page6 (ctx) {
var p = page({ctx: ctx, title: "A PROPOS"}); // scrollSpeed: 16
var sp = page({ctx: ctx})
var gl = gridLayout({nbColumns: 1, nbRows: 10, spaceH: 5, spaceW: 1, maxWidth: 300, maxHeight: 240});
var t1 = textWidget({
text: "QUI ES-TU ?",
relPos: {x: 0, y: 0},
font: fbig,
});
var t2 = textWidget({
text: "Je suis Freddy Clement et je suis programmateur d'ordinateurs.",
relPos: {x: 0, y: 20},
font: f,
});
var t3 = textWidget({
text: "COMMENT EST FAIT CE SITE ?!",
relPos: {x: 0, y: 50},
font: fbig,
});
var t4 = textWidget({
text: "Integralement en Javascript, dessine dans un Canvas HTML5.\nTout est fait main, from scratch, du framework code pour l'occasion\na la typo, en passant par les icones !",
relPos: {x: 0, y: 70},
font: f,
});
var t11 = textWidget({
text: "QUEL GENRE DE TRAVAIL ?",
relPos: {x: 0, y: 50},
font: fbig,
});
var t12 = textWidget({
text: "Quelque chose dans le developpement de jeux video. Peu importe a vrai dire.\nMon domaine de predilection se trouvant etre la programmation, je me\nplacerais idealement dans les bottes d'un dev gameplay/moteur/pipeline.",
relPos: {x: 0, y: 70},
font: f,
});
var t5 = textWidget({
text: "POURQUOI UN SITE EN FULL JS/CANVAS ?",
relPos: {x: 0, y: 50},
font: fbig,
});
var t6 = textWidget({
text: "J'aime pas le CSS.",
relPos: {x: 0, y: 70},
font: f,
});
var t7 = textWidget({
text: "JE PEUX VOIR LE CODE ???",
relPos: {x: 0, y: 130},
font: fbig,
});
var t8 = textWidget({
text: "Il est un peu degueu car ecrit en vitesse.\nJette un oeil si tu trouves mon GitHub, mais je ne donnerai pas de lien\ntant que j'aurai pas refacto, histoire de me deresponsabiliser en cas\nd'eventuel saignement oculaire. :>",
relPos: {x: 0, y: 150},
font: f,
});
var t9 = textWidget({
text: "ET SINON, A PART CA ?",
relPos: {x: 0, y: 230},
font: fbig,
});
var t10 = textWidget({
text: "J'ecoute des teratonnes de musiques, tous genres confondus,\ndes fois je prends des photos, joue a plein de jeux videos solo, bade\nquand un petit enfant casse ou perd son jouet, lis des manuels de\nprogrammation pour Macintosh Plus aux toilettes, reponds aux ordres\nd'un animal felin de sexe feminin, collectionne les vieux ordinateurs\net vieilles consoles, et adore tenter de programmer des trucs dessus.",
relPos: {x: 0, y: 250},
font: f,
});
gl.addWidget(t1);
gl.addWidget(t2);
//gl.addWidget(t11);
//gl.addWidget(t12);
gl.addWidget(t3);
gl.addWidget(t4);
gl.addWidget(t5);
gl.addWidget(t6);
gl.addWidget(t7);
gl.addWidget(t8);
gl.addWidget(t9);
gl.addWidget(t10);
sp.addWidget(gl);
var sc = scrollableContainer({ctx: ctx, widget: sp, size: {w: 290, h: 180}})
p.onGoTo = function () {
siteCanvas.getBGManager().setBGOpacity(0.5);
};
// delete on commente ca si tu veux plus du bg random au switch
p.onLeave = function () {
siteCanvas.getBGManager().switchBG(3 + Math.floor(Math.random() * (siteCanvas.getBGManager().bgList.length-3)), true);
};
p.addWidget(sc);
return p;
}
// -- MAIN --
var siteCanvas = new function() {
var canvas;
var color;
var text;
var x, y;
var b;
var frame;
var mp;
var nb;
var bg;
var progressBar;
var preloadFinished = false;
this.registeredMouseInputWidgetList = [];
this.registeredMouseHoverInputWidgetList = [];
this.canvas = undefined;
var nbAssetsToPreload = 1;
var nbAssetsPreloaded = 0;
var inputFocusWidget = null;
var imageList = [
"img/loading.png",
"img/ati.png",
"img/after-effects.png",
"img/arrows.png",
"img/awesome.png",
"img/awesome-mini.png",
"img/bp.png",
"img/blender.png",
"img/buttons-header.png",
"img/c.png",
"img/chu.png",
"img/cpp.png",
"img/dontnod.png",
"img/emissive.png",
"img/font-big.png",
"img/font-small.png",
"img/iut.png",
"img/javascript.png",
"img/kebab.png",
"img/lycee.png",
"img/maya.png",
"img/photoshop.png",
"img/premiere.png",
"img/python.png",
"img/shittyhollow.png",
"img/solidanim.png",
"img/teamto.png",
"img/the-friendzone.png",
"img/ui-misc-small.png",
"img/unreal.png",
"img/whirlpool.png",
"img/msdos.png",
"img/pico8.png",
"img/sourcefilmmaker.png",
"img/unity.png",
"img/small-arrow-animated.png",
"img/extern.png",
"img/extern-anim.png",
"img/sylvain.png",
"img/bubble-l.png",
"img/bubble-r.png",
"img/bubble-t.png",
"img/bubble-b.png",
"img/bubble-tl.png",
"img/bubble-tr.png",
"img/bubble-bl.png",
"img/bubble-br.png",
]
this.preload = function () {
ctx = this.canvas.getContext('2d');
bg = backgroundManager({
ctx: ctx,
transitionTime: 200,
transitionBgId: 0,
});
bg.addBG(backgroundSnow({ctx: ctx}));
bg.currBG = 0;
progressBar = progressBarWidget({
ctx: ctx,
size: {w: 310, h: 4},
absPos: {x: 5, y: 15},
min: 1,
max: imageList.length,
value: 0,
});
rscManager = ressourceManager({
onAllLoaded: function () {
siteCanvas.init();
preloadFinished = true;
},
onEachResourceLoaded: function (rsc) {
progressBar.setValue(progressBar.value+1);
if (rsc.name == "loading") {
bg.addBG(backgroundLoading({
ctx: ctx,
image: rsc.data,
}));
bg.currBG = 1;
}
},
});
for (var i = 0; i < imageList.length; i++)
rscManager.addImg(imageList[i]);