-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
479 lines (431 loc) · 30.5 KB
/
index.html
File metadata and controls
479 lines (431 loc) · 30.5 KB
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
<!DOCTYPE html>
<html lang="fr" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Samyn-Antoy ABASSE | Portfolio Interactif 2.0</title>
<!-- Favicon Premium 2026 (SVG Data URI) - Zéro requête HTTP, Scalabilité Infinie -->
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><defs><linearGradient id='g' x1='0%' y1='0%' x2='100%' y2='100%'><stop offset='0%' stop-color='%23a855f7'/><stop offset='100%' stop-color='%233b82f6'/></linearGradient></defs><rect width='100' height='100' rx='25' fill='%230f172a'/><text x='50%' y='55%' font-family='system-ui, sans-serif' font-weight='800' font-size='45' fill='url(%23g)' dominant-baseline='middle' text-anchor='middle'>S.A</text></svg>">
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Polices Google Fonts (Inter) -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<!-- Styles personnalisés et configuration de Tailwind -->
<style>
:root {
--c-primary: #a855f7; /* Violet (purple-500) */
--c-secondary: #3b82f6; /* Bleu (blue-500) */
--c-dark: #0f172a; /* (slate-900) */
--c-light: #f1f5f9; /* (slate-100) */
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--c-dark);
color: var(--c-light);
overflow-x: hidden;
}
/* Conteneur pour la scène 3D */
#canvas-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.5;
}
/* Effet de verre (Glassmorphism) */
.glass-card {
background: rgba(15, 23, 42, 0.6); /* slate-900 avec opacité */
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.1);
}
/* Dégradé pour les titres */
.text-gradient {
background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/* Configuration de Tailwind (pour les polices) */
tailwind.config = {
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'sans-serif'],
},
colors: {
primary: 'var(--c-primary)',
secondary: 'var(--c-secondary)',
dark: 'var(--c-dark)',
light: 'var(--c-light)',
}
}
}
};
/* Styles pour les animations GSAP (éléments cachés au départ) */
.gsap-reveal {
opacity: 0;
transform: translateY(60px);
}
</style>
</head>
<body class="antialiased">
<!-- Scène 3D Three.js -->
<div id="canvas-container"></div>
<!-- Conteneur principal -->
<div class="relative z-10 max-w-6xl px-4 mx-auto">
<!-- HEADER & NAVIGATION -->
<header id="header" class="fixed top-0 left-0 right-0 z-50">
<nav class="flex items-center justify-between max-w-6xl px-6 py-4 mx-auto mt-4 rounded-full glass-card">
<div class="text-2xl font-bold text-white">
S.A
</div>
<div class="hidden space-x-6 md:flex">
<a href="#hero" class="text-sm font-medium transition-colors text-slate-300 hover:text-white">Accueil</a>
<a href="#about" class="text-sm font-medium transition-colors text-slate-300 hover:text-white">À Propos</a>
<a href="#skills" class="text-sm font-medium transition-colors text-slate-300 hover:text-white">Compétences</a>
<a href="#projects" class="text-sm font-medium transition-colors text-slate-300 hover:text-white">Projets</a>
<a href="#contact" class="text-sm font-medium transition-colors text-slate-300 hover:text-white">Contact</a>
</div>
<a href="#contact" class="hidden px-5 py-2 text-sm font-semibold text-white transition-all rounded-full md:block bg-secondary hover:bg-blue-400 hover:shadow-lg hover:shadow-blue-500/30">
Contactez-moi
</a>
</nav>
</header>
<main class="pt-32">
<!-- SECTION HÉROS -->
<section id="hero" class="flex flex-col items-center justify-center min-h-[80vh] text-center">
<h1 class="text-5xl font-extrabold tracking-tighter text-white md:text-7xl lg:text-8xl gsap-reveal">
Samyn-Antoy ABASSE
</h1>
<p class="mt-4 text-2xl font-medium md:text-3xl lg:text-4xl text-gradient gsap-reveal" style="--delay: 0.2s;">
Ingénieur Prompt & Développeur créatif
</p>
<p class="max-w-2xl mt-6 text-lg text-slate-300 md:text-xl gsap-reveal" style="--delay: 0.4s;">
Je transforme les idées complexes en expériences numériques immersives et solutions logicielles élégantes.
</p>
<a href="#projects" class="px-8 py-3 mt-10 text-lg font-semibold text-white transition-all rounded-full gsap-reveal bg-primary hover:bg-purple-400 hover:shadow-lg hover:shadow-purple-500/30 hover:scale-105" style="--delay: 0.6s;">
Découvrir mes projets
</a>
</section>
<!-- SECTION À PROPOS -->
<section id="about" class="py-20 md:py-32">
<div class="grid items-center gap-12 md:grid-cols-2">
<div class="gsap-reveal">
<h2 class="text-4xl font-bold tracking-tighter text-white md:text-5xl">À Propos de Moi</h2>
<div class="mt-6 space-y-4 text-lg text-slate-300">
<p>Passionné par le dialogue avec l'intelligence artificielle et son potentiel, je suis un ingénieur prompt autodidacte. Ma compétence repose sur des milliers d'heures d'expérimentation et une compréhension intuitive des modèles de langage.</p>
<p>Je me spécialise dans la formulation d'instructions précises pour générer du code, créer des contenus complexes et résoudre des problèmes de manière innovante.</p>
</div>
</div>
<div class="p-8 rounded-2xl glass-card gsap-reveal" style="--delay: 0.3s;">
<ul class="space-y-4 text-lg">
<li class="flex items-start">
<span class="pr-3 text-2xl text-secondary">🚀</span>
<div><span class="font-semibold text-white">Spécialités :</span> Développement Full-Stack, Logiciels, Scripts, IA.</div>
</li>
<li class="flex items-start">
<span class="pr-3 text-2xl text-primary">🎯</span>
<div><span class="font-semibold text-white">Mission :</span> Concevoir des solutions élégantes, évolutives et sécurisées.</div>
</li>
<li class="flex items-start">
<span class="pr-3 text-2xl text-secondary">📍</span>
<div><span class="font-semibold text-white">Localisation :</span> Mayotte, Océan Indien.</div>
</li>
</ul>
</div>
</div>
</section>
<!-- SECTION COMPÉTENCES (BENTO GRID) -->
<section id="skills" class="py-20 md:py-32">
<h2 class="mb-12 text-4xl font-bold tracking-tighter text-center text-white md:text-5xl gsap-reveal">Ma Boîte à Outils Technologique</h2>
<div class="grid grid-cols-1 gap-6 md:grid-cols-3 lg:grid-cols-4">
<!-- Frontend -->
<div class="p-8 transition-all duration-300 transform md:col-span-2 rounded-2xl glass-card hover:border-primary/50 hover:shadow-2xl hover:shadow-primary/20 hover:-translate-y-1 gsap-reveal">
<div class="mb-4 text-4xl">🚀</div>
<h3 class="mb-2 text-2xl font-semibold text-white">Frontend</h3>
<p class="text-slate-300">HTML, CSS, Sass, JavaScript, React.js, GSAP (GreenSock), JSX, Tailwind CSS</p>
</div>
<!-- Backend -->
<div class="p-8 transition-all duration-300 transform lg:col-span-2 md:col-span-1 rounded-2xl glass-card hover:border-secondary/50 hover:shadow-2xl hover:shadow-secondary/20 hover:-translate-y-1 gsap-reveal" style="--delay: 0.1s;">
<div class="mb-4 text-4xl">⚙️</div>
<h3 class="mb-2 text-2xl font-semibold text-white">Backend</h3>
<p class="text-slate-300">Java, Jakarta EE, Spring Boot, SQL & NoSQL, WAMP/MAMP/LAMP</p>
</div>
<!-- API & Sécurité -->
<div class="p-8 transition-all duration-300 transform lg:col-span-2 md:col-span-1 rounded-2xl glass-card hover:border-secondary/50 hover:shadow-2xl hover:shadow-secondary/20 hover:-translate-y-1 gsap-reveal" style="--delay: 0.2s;">
<div class="mb-4 text-4xl">🛡️</div>
<h3 class="mb-2 text-2xl font-semibold text-white">API & Sécurité</h3>
<p class="text-slate-300">RESTful API, GraphQL, Spring Security, OAuth2, JWT</p>
</div>
<!-- Outils & DevOps -->
<div class="p-8 transition-all duration-300 transform md:col-span-2 rounded-2xl glass-card hover:border-primary/50 hover:shadow-2xl hover:shadow-primary/20 hover:-translate-y-1 gsap-reveal" style="--delay: 0.3s;">
<div class="mb-4 text-4xl">🛠️</div>
<h3 class="mb-2 text-2xl font-semibold text-white">Outils & DevOps</h3>
<p class="text-slate-300">Git, GitHub, Docker, Maven, Gradle, Glassfish, Agile (Scrum/Kaban)</p>
</div>
</div>
</section>
<!-- SECTION PROJETS (BENTO GRID AMÉLIORÉE) -->
<section id="projects" class="py-20 md:py-32">
<h2 class="mb-4 text-4xl font-bold tracking-tighter text-center text-white md:text-5xl gsap-reveal">Mes Projets</h2>
<p class="max-w-3xl mx-auto mb-12 text-lg text-center text-slate-300 md:text-xl gsap-reveal" style="--delay: 0.1s;">
Une sélection de projets qui démontrent ma passion pour la création de solutions robustes et d'expériences utilisateur engageantes.
</p>
<div class="grid grid-cols-1 gap-6 lg:grid-cols-3 md:grid-cols-2">
<!-- Projet 1: Horloge Futuriste (Large) -->
<div class="flex flex-col overflow-hidden transition-all duration-300 transform rounded-2xl glass-card project-card lg:col-span-2 hover:shadow-2xl hover:shadow-primary/20 gsap-reveal" style="--delay: 0.2s;">
<div class="overflow-hidden h-60 md:h-80">
<img src="https://placehold.co/800x400/0f172a/a855f7?text=Horloge+Futuriste&font=inter" alt="Placeholder Horloge Futuriste" class="object-cover w-full h-full transition-transform duration-500 ease-in-out hover:scale-105">
</div>
<div class="flex flex-col flex-grow p-6 md:p-8">
<h3 class="mb-2 text-2xl font-semibold text-white">Application Horloge Futuriste</h3>
<p class="mb-4 text-slate-300">Une application de bureau Java (Swing) avec alarmes, chronomètre, et design futuriste personnalisable.</p>
<div class="flex flex-wrap gap-2 mt-auto mb-4">
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">Java 8+</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">Swing</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">AWT</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">Desktop</span>
</div>
<a href="https://github.com/TechNerdSam/HorlogeNumerique" target="_blank" rel="noopener noreferrer" class="self-start text-sm font-semibold transition-colors text-secondary hover:text-blue-400">Voir le Code →</a>
</div>
</div>
<!-- Projet 2: Raccourcisseur d'URL -->
<div class="flex flex-col overflow-hidden transition-all duration-300 transform rounded-2xl glass-card project-card hover:shadow-2xl hover:shadow-secondary/20 gsap-reveal" style="--delay: 0.3s;">
<div class="flex flex-col flex-grow p-6 md:p-8">
<span class="mb-2 text-sm font-semibold text-secondary">API & Service Web</span>
<h3 class="mb-2 text-2xl font-semibold text-white">Raccourcisseur d'URL</h3>
<p class="mb-4 text-slate-300">Service back-end complet avec Spring Boot pour créer et gérer des URL courtes.</p>
<div class="flex flex-wrap gap-2 mt-auto mb-4">
<span class="px-3 py-1 text-xs font-medium rounded-full bg-secondary/20 text-secondary">Spring Boot</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-secondary/20 text-secondary">Java 17</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-secondary/20 text-secondary">JPA</span>
</div>
<a href="https://github.com/TechNerdSam/urlshortener" target="_blank" rel="noopener noreferrer" class="self-start text-sm font-semibold transition-colors text-secondary hover:text-blue-400">Voir le Code →</a>
</div>
</div>
<!-- Projet 3: Landing Page "ApexSolutions" -->
<div class="flex flex-col overflow-hidden transition-all duration-300 transform rounded-2xl glass-card project-card hover:shadow-2xl hover:shadow-secondary/20 gsap-reveal" style="--delay: 0.2s;">
<div class="flex flex-col flex-grow p-6 md:p-8">
<span class="mb-2 text-sm font-semibold text-secondary">Application Web</span>
<h3 class="mb-2 text-2xl font-semibold text-white">Landing Page "ApexSolutions"</h3>
<p class="mb-4 text-slate-300">Landing page dynamique pour une entreprise, servie par Spring Boot avec Thymeleaf.</p>
<div class="flex flex-wrap gap-2 mt-auto mb-4">
<span class="px-3 py-1 text-xs font-medium rounded-full bg-secondary/20 text-secondary">Spring Boot</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-secondary/20 text-secondary">Thymeleaf</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-secondary/20 text-secondary">MVC</span>
</div>
<a href="https://github.com/TechNerdSam/ApexSolutions" target="_blank" rel="noopener noreferrer" class="self-start text-sm font-semibold transition-colors text-secondary hover:text-blue-400">Voir le Code →</a>
</div>
</div>
<!-- Projet 4: CV Interactif (Large) -->
<div class="flex flex-col overflow-hidden transition-all duration-300 transform rounded-2xl glass-card project-card lg:col-span-2 hover:shadow-2xl hover:shadow-primary/20 gsap-reveal" style="--delay: 0.3s;">
<div class="overflow-hidden h-60 md:h-80">
<img src="https://placehold.co/800x400/0f172a/3b82f6?text=CV+Interactif+(Bento)&font=inter" alt="Placeholder CV Interactif" class="object-cover w-full h-full transition-transform duration-500 ease-in-out hover:scale-105">
</div>
<div class="flex flex-col flex-grow p-6 md:p-8">
<h3 class="mb-2 text-2xl font-semibold text-white">CV Interactif (Bento Grid)</h3>
<p class="mb-4 text-slate-300">Mon CV personnel en ligne, conçu avec un design "Bento Grid" moderne, des effets interactifs et une esthétique épurée.</p>
<div class="flex flex-wrap gap-2 mt-auto mb-4">
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">HTML5</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">Tailwind CSS</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">JavaScript</span>
</div>
<div class="flex space-x-4">
<a href="https://github.com/TechNerdSam/monCV-en-ligne" target="_blank" rel="noopener noreferrer" class="self-start text-sm font-semibold transition-colors text-secondary hover:text-blue-400">Voir le Code →</a>
<a href="https://technerdsam.github.io/monCV-en-ligne/" target="_blank" rel="noopener noreferrer" class="self-start text-sm font-semibold transition-colors text-secondary hover:text-blue-400">Voir le Site →</a>
</div>
</div>
</div>
<!-- Projet 5: Guide des Rêves -->
<div class="flex flex-col overflow-hidden transition-all duration-300 transform rounded-2xl glass-card project-card hover:shadow-2xl hover:shadow-secondary/20 gsap-reveal" style="--delay: 0.2s;">
<div class="flex flex-col flex-grow p-6 md:p-8">
<span class="mb-2 text-sm font-semibold text-secondary">Frontend & IA</span>
<h3 class="mb-2 text-2xl font-semibold text-white">Guide des Rêves en Islam</h3>
<p class="mb-4 text-slate-300">Un guide interactif avec dictionnaire et un interprète personnel alimenté par l'IA (Google Gemini).</p>
<div class="flex flex-wrap gap-2 mt-auto mb-4">
<span class="px-3 py-1 text-xs font-medium rounded-full bg-secondary/20 text-secondary">HTML5</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-secondary/20 text-secondary">Tailwind CSS</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-secondary/20 text-secondary">Google Gemini</span>
</div>
<div class="flex space-x-4">
<a href="https://github.com/TechNerdSam/laughing-broccoli" target="_blank" rel="noopener noreferrer" class="self-start text-sm font-semibold transition-colors text-secondary hover:text-blue-400">Voir le Code →</a>
<a href="https://technerdsam.github.io/laughing-broccoli/" target="_blank" rel="noopener noreferrer" class="self-start text-sm font-semibold transition-colors text-secondary hover:text-blue-400">Voir le Site →</a>
</div>
</div>
</div>
<!-- Projet 6: Rapport Full-Stack -->
<div class="flex flex-col overflow-hidden transition-all duration-300 transform rounded-2xl glass-card project-card hover:shadow-2xl hover:shadow-primary/20 gsap-reveal" style="--delay: 0.3s;">
<div class="flex flex-col flex-grow p-6 md:p-8">
<span class="mb-2 text-sm font-semibold text-primary">Rapport & Analyse</span>
<h3 class="mb-2 text-2xl font-semibold text-white">Rapport Full-Stack Java 2025</h3>
<p class="mb-4 text-slate-300">Analyse détaillée des opportunités et des défis de la spécialisation Full-Stack dans l'écosystème Java moderne.</p>
<div class="flex flex-wrap gap-2 mt-auto mb-4">
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">HTML5</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">CSS3</span>
<span class="px-3 py-1 text-xs font-medium rounded-full bg-primary/20 text-primary">Analyse</span>
</div>
<div class="flex space-x-4">
<a href="https://github.com/TechNerdSam/rapports-full-stack-2025" target="_blank" rel="noopener noreferrer" class="self-start text-sm font-semibold transition-colors text-secondary hover:text-blue-400">Voir le Code →</a>
<a href="https://technerdsam.github.io/rapports-full-stack-2025/" target="_blank" rel="noopener noreferrer" class="self-start text-sm font-semibold transition-colors text-secondary hover:text-blue-400">Consulter le Rapport →</a>
</div>
</div>
</div>
</div>
</section>
<!-- SECTION CONTACT -->
<section id="contact" class="py-20 md:py-32">
<div class="max-w-3xl p-8 mx-auto text-center md:p-12 rounded-2xl glass-card gsap-reveal">
<h2 class="text-4xl font-bold tracking-tighter text-white md:text-5xl">Entrons en Contact</h2>
<p class="max-w-xl mx-auto mt-4 text-lg text-slate-300">
Une question, une proposition de projet, ou simplement envie de discuter ? N'hésitez pas. Je suis toujours ouvert à de nouvelles opportunités et collaborations.
</p>
<a href="mailto:samynantoy@gmail.com" class="inline-block px-8 py-3 mt-10 text-lg font-semibold text-white transition-all rounded-full bg-primary hover:bg-purple-400 hover:shadow-lg hover:shadow-purple-500/30 hover:scale-105">
Envoyer un e-mail
</a>
<div class="flex items-center justify-center mt-10 space-x-6">
<a href="https://github.com/TechNerdSam" target="_blank" rel="noopener noreferrer" class="font-medium transition-colors text-slate-300 hover:text-white">GitHub</a>
<span class="text-slate-500">/</span>
<a href="https://www.linkedin.com/in/samyn-antoy-abasse-438746171/" target="_blank" rel="noopener noreferrer" class="font-medium transition-colors text-slate-300 hover:text-white">LinkedIn</a>
</div>
</div>
</section>
</main>
<!-- FOOTER -->
<footer class="py-12 text-center border-t border-white/10">
<p class="text-slate-400">© 2025 Samyn-Antoy ABASSE. Design & Développement avec passion.</p>
</footer>
</div>
<!-- Bibliothèques JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/ScrollTrigger.min.js"></script>
<!-- Script principal -->
<script>
document.addEventListener('DOMContentLoaded', () => {
// ----------------------------------------
// SCÈNE 3D AVEC THREE.JS (Simplifiée)
// ----------------------------------------
const container = document.getElementById('canvas-container');
if (container) {
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ alpha: true });
renderer.setSize(window.innerWidth, window.innerHeight);
container.appendChild(renderer.domElement);
const starGeometry = new THREE.BufferGeometry();
const starCount = 6000;
const posArray = new Float32Array(starCount * 3);
const colors = new Float32Array(starCount * 3);
const colorPrimary = new THREE.Color(0xa855f7); // --c-primary
const colorSecondary = new THREE.Color(0x3b82f6); // --c-secondary
for (let i = 0; i < starCount * 3; i++) {
posArray[i] = (Math.random() - 0.5) * 100;
const color = Math.random() > 0.5 ? colorPrimary : colorSecondary;
colors[i * 3 + 0] = color.r;
colors[i * 3 + 1] = color.g;
colors[i * 3 + 2] = color.b;
}
starGeometry.setAttribute('position', new THREE.BufferAttribute(posArray, 3));
starGeometry.setAttribute('color', new THREE.BufferAttribute(colors, 3));
const starMaterial = new THREE.PointsMaterial({
size: 0.05,
vertexColors: true,
transparent: true,
opacity: 0.8
});
const starMesh = new THREE.Points(starGeometry, starMaterial);
scene.add(starMesh);
camera.position.z = 5;
let mouseX = 0;
let mouseY = 0;
document.addEventListener('mousemove', (event) => {
mouseX = event.clientX;
mouseY = event.clientY;
});
function animate() {
requestAnimationFrame(animate);
starMesh.rotation.y += 0.0001;
starMesh.rotation.x += 0.0001;
if (mouseX > 0) {
camera.position.x += ((mouseX - window.innerWidth / 2) / window.innerWidth * 2 - camera.position.x) * 0.01;
camera.position.y += (-(mouseY - window.innerHeight / 2) / window.innerHeight * 2 - camera.position.y) * 0.01;
}
camera.lookAt(scene.position);
renderer.render(scene, camera);
}
animate();
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
}
// ----------------------------------------
// ANIMATIONS AVEC GSAP & SCROLLTRIGGER
// ----------------------------------------
gsap.registerPlugin(ScrollTrigger);
// Animation d'apparition générale
const cards = document.querySelectorAll(".gsap-reveal");
cards.forEach(card => {
const delay = parseFloat(card.style.getPropertyValue("--delay")) || 0;
gsap.from(card, {
scrollTrigger: {
trigger: card,
start: "top 90%",
toggleActions: "play none none none"
},
opacity: 0,
y: 60,
duration: 1,
delay: delay,
ease: 'power3.out'
});
});
// Animation de la barre de navigation
gsap.from("#header", {
y: -100,
opacity: 0,
duration: 1,
delay: 1,
ease: 'power3.out'
});
// ----------------------------------------
// EFFET 3D SUR LES CARTES DE PROJET
// ----------------------------------------
const projectCards = document.querySelectorAll('.project-card');
projectCards.forEach(card => {
card.addEventListener('mousemove', (e) => {
const rect = card.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
const centerX = rect.width / 2;
const centerY = rect.height / 2;
const rotateX = ((y - centerY) / centerY) * -5; // Angle réduit
const rotateY = ((x - centerX) / centerX) * 5;
gsap.to(card, {
duration: 0.7,
rotationX: rotateX,
rotationY: rotateY,
scale: 1.03,
transformPerspective: 1000,
ease: 'power3.out'
});
});
card.addEventListener('mouseleave', () => {
gsap.to(card, {
duration: 0.7,
rotationX: 0,
rotationY: 0,
scale: 1.0,
ease: 'power3.out'
});
});
});
});
</script>
</body>
</html>