-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
235 lines (202 loc) · 6.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#111111">
<meta name="msapplication-navbutton-color" content="#111111">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="https://wartets.github.io/N-Body-Problem/image/browser-icon.png">
<meta name="robots" content="index, follow">
<meta name="description" content="Experience the beauty of nature's flocking behavior in the Bird-cloud simulation, based on the Boids model. Adjust parameters like speed and randomness to create dynamic bird flocks, crafted by Wartets (Colin Bossu).">
<meta name="keywords" content="Boids model, bird flocking, simulation, interactive bird behavior, flocking patterns, randomness, speed, Wartets, Colin Bossu">
<!-- Open Graph Meta Tags -->
<meta property="og:title" content="Bird-cloud: Flocking Simulation | Wartets">
<meta property="og:description" content="Control bird flocking behavior with adjustable parameters in this interactive simulation based on the Boids algorithm. A fascinating creation by Wartets (Colin Bossu).">
<meta property="og:image" content="https://wartets.github.io/Wartets/img/BirdCloud-card.png">
<meta property="og:type" content="website">
<meta property="og:url" content="https://wartets.github.io/Bird-cloud/">
<title>Simulateur de nuée</title>
<link rel="icon" href="https://wartets.github.io/N-Body-Problem/image/browser-icon.png">
<style>
canvas {
background-color: #000;
display: flex;
width: 100vw;
height: 100vh;
}
body {
margin: 0;
display: flex;
width: 100vw;
height: 100vh;
overflow: hidden;
font-family: 'Arial', sans-serif;
font-size: 14px;
color: #fff;
}
#controls-toggle {
position: fixed;
top: 10px;
right: 10px;
background: #333;
color: #fff;
border-radius: 5px;
padding: 10px;
cursor: pointer;
z-index: 1000;
opacity: 0.5;
transition: background-color 0.3s ease, transform 0.3s ease;
}
#controls-toggle:hover {
opacity: 1;
background: #444;
transform: scale(1.1);
}
#controls-window {
position: fixed;
top: 10px;
right: 60px;
background: rgba(0, 0, 0, 0.8);
color: #fff;
padding: 20px;
border-radius: 10px;
visibility: hidden;
opacity: 0;
transition: opacity 0.3s ease, visibility 0s 0.3s;
z-index: 1000;
}
#controls-window.show {
visibility: visible;
opacity: 1;
transition: opacity 0.3s ease, visibility 0s 0s;
}
#controls-window,
#controls-toggle,
#readme-window,
#readme-toggle {
user-select: none;
}
input[type="range"] {
cursor: pointer;
}
input[type="range"]:hover {
cursor: ew-resize;
}
input[type="checkbox"] {
cursor: pointer;
}
#controls-window label {
display: block;
margin: 10px 0 5px;
}
#controls-window input[type="range"] {
width: 100%;
}
#controls-window h2 {
margin-top: 0;
}
.checkbox-container {
display: flex;
align-items: center;
}
.checkbox-container input[type="checkbox"] {
margin-right: 10px;
}
#wartets-link {
position: fixed;
top: 10px;
left: 10px;
color: #ffffff;
background-color: none;
padding: 10px;
border-radius: 5px;
font-size: 14px;
opacity: 0.7;
transition: color 0.3s ease, opacity 0.3s ease, text-decoration 0.3s ease;
}
#wartets-link:hover {
left: 7px;
top: 8px;
color: #eee;
text-decoration: underline;
cursor: pointer;
font-size: 15px;
opacity: 1;
transition: color 0.3s ease, opacity 0.1s ease, text-decoration 0.3s ease;
}
#readme-toggle {
position: fixed;
bottom: 10px;
right: 10px;
background: #333;
color: #fff;
border-radius: 5px;
padding: 10px;
cursor: pointer;
z-index: 1000;
opacity: 0.5;
transition: background-color 0.3s ease, transform 0.3s ease;
}
#readme-toggle:hover {
background: #444;
transform: scale(1.1);
opacity: 1;
}
#readme-window {
position: fixed;
bottom: 60px;
right: 10px;
background: rgba(0, 0, 0, 0.9);
color: #fff;
padding: 20px;
border-radius: 10px;
width: 400px;
max-height: 70vh;
overflow-y: auto;
visibility: hidden;
opacity: 0;
transition: opacity 0.3s ease, visibility 0s 0.3s;
z-index: 1000;
font-size: 14px;
line-height: 1.5;
}
#readme-window.show {
visibility: visible;
opacity: 1;
transition: opacity 0.3s ease, visibility 0s 0s;
}
</style>
</head>
<body>
<canvas id="birdsCanvas"></canvas>
<div id="controls-toggle">⚙️</div>
<div id="controls-window">
<h2>Paramètres</h2>
<label>Nombre d'oiseaux: <span id="num-birds-label"></span></label>
<input type="range" id="num-birds" min="1" max="500" value="100">
<label>Vitesse maximale: <span id="max-speed-label"></span></label>
<input type="range" id="max-speed" min="0" max="10" step="0.1" value="3">
<label>Force maximale: <span id="max-force-label"></span></label>
<input type="range" id="max-force" min="0" max="1" step="0.01" value="0.05">
<label>Rayon de vision: <span id="vision-radius-label"></span></label>
<input type="range" id="vision-radius" min="0" max="100" value="40">
<label>Rayon d'évitement: <span id="avoid-radius-label"></span></label>
<input type="range" id="avoid-radius" min="0" max="100" value="30">
<label>Seuil de Fatigue: <span id="max-fatigue-label"></span></label>
<input type="range" id="max-fatigue" min="0" max="20" step="0.1" value="6">
<label>Facteur d'inattention: <span id="misconduct-label"></span></label>
<input type="range" id="misconduct" min="0" max="10" step="0.1" value="1">
<div class="checkbox-container">
<input type="checkbox" id="color-cohesion-checkbox" />
<label for="color-cohesion-checkbox">Cohésion colorimétrique</label>
</div>
</div>
<div id="readme-toggle">❓</div>
<div id="readme-window">
<!-- Le contenu du README sera inséré ici dynamiquement -->
</div>
<a href="https://github.com/wartets/Bird-cloud/" target="_blank" id="wartets-link">@Wartets</a>
<script src="js\script.js"></script>
</body>
</html>