josh commited on
Commit
b42ab77
·
verified ·
1 Parent(s): f2c08a0

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +937 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Absurd Aquarium
3
- emoji: 🐨
4
- colorFrom: indigo
5
- colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: absurd-aquarium
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: green
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,937 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Virtual Fish Tank</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @keyframes bubble-float {
11
+ 0% {
12
+ transform: translateY(0) rotate(0deg);
13
+ opacity: 0;
14
+ }
15
+ 10% {
16
+ opacity: 1;
17
+ }
18
+ 90% {
19
+ opacity: 1;
20
+ }
21
+ 100% {
22
+ transform: translateY(-100vh) rotate(360deg);
23
+ opacity: 0;
24
+ }
25
+ }
26
+
27
+ @keyframes fish-swim {
28
+ 0% {
29
+ transform: translateX(-100px);
30
+ }
31
+ 100% {
32
+ transform: translateX(calc(100vw + 100px));
33
+ }
34
+ }
35
+
36
+ @keyframes tail-wag {
37
+ 0%, 100% {
38
+ transform: translateY(-50%) rotate(0deg);
39
+ }
40
+ 50% {
41
+ transform: translateY(-50%) rotate(30deg);
42
+ }
43
+ }
44
+
45
+ @keyframes fin-wave {
46
+ 0%, 100% {
47
+ transform: rotate(-10deg);
48
+ }
49
+ 50% {
50
+ transform: rotate(10deg);
51
+ }
52
+ }
53
+
54
+ @keyframes mouth-open {
55
+ 0%, 100% {
56
+ transform: scaleY(1);
57
+ }
58
+ 50% {
59
+ transform: scaleY(0.8);
60
+ }
61
+ }
62
+
63
+ .bubble {
64
+ animation: bubble-float linear infinite;
65
+ position: absolute;
66
+ border-radius: 50%;
67
+ background: rgba(255, 255, 255, 0.6);
68
+ box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
69
+ }
70
+
71
+ .fish {
72
+ position: absolute;
73
+ filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
74
+ z-index: 10;
75
+ }
76
+
77
+ .fish-body {
78
+ position: relative;
79
+ width: 100%;
80
+ height: 100%;
81
+ border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
82
+ }
83
+
84
+ .fish-tail {
85
+ position: absolute;
86
+ right: -15px;
87
+ top: 50%;
88
+ transform: translateY(-50%);
89
+ width: 0;
90
+ height: 0;
91
+ border-top: 10px solid transparent;
92
+ border-bottom: 10px solid transparent;
93
+ border-right: 20px solid;
94
+ animation: tail-wag 0.5s infinite;
95
+ }
96
+
97
+ .fish-eye {
98
+ position: absolute;
99
+ width: 8px;
100
+ height: 8px;
101
+ background-color: black;
102
+ border-radius: 50%;
103
+ top: 25%;
104
+ left: 20%;
105
+ }
106
+
107
+ .fish-pupil {
108
+ position: absolute;
109
+ width: 3px;
110
+ height: 3px;
111
+ background-color: white;
112
+ border-radius: 50%;
113
+ top: 2px;
114
+ left: 2px;
115
+ }
116
+
117
+ .fish-fin {
118
+ position: absolute;
119
+ width: 15px;
120
+ height: 30px;
121
+ border-radius: 50%;
122
+ top: 10%;
123
+ left: 30%;
124
+ animation: fin-wave 0.7s infinite;
125
+ transform-origin: bottom;
126
+ }
127
+
128
+ .fish-dorsal-fin {
129
+ position: absolute;
130
+ width: 10px;
131
+ height: 30px;
132
+ top: -15px;
133
+ left: 40%;
134
+ animation: fin-wave 0.9s infinite;
135
+ transform-origin: bottom;
136
+ }
137
+
138
+ .fish-mouth {
139
+ position: absolute;
140
+ width: 10px;
141
+ height: 5px;
142
+ background-color: rgba(0, 0, 0, 0.3);
143
+ border-radius: 50%;
144
+ bottom: 20%;
145
+ left: 10%;
146
+ transform-origin: center;
147
+ animation: mouth-open 2s infinite;
148
+ }
149
+
150
+ .fish-stripe {
151
+ position: absolute;
152
+ height: 4px;
153
+ background-color: rgba(0, 0, 0, 0.2);
154
+ border-radius: 2px;
155
+ top: 40%;
156
+ left: 25%;
157
+ width: 50%;
158
+ }
159
+
160
+ .fish-spot {
161
+ position: absolute;
162
+ width: 8px;
163
+ height: 8px;
164
+ border-radius: 50%;
165
+ background-color: rgba(0, 0, 0, 0.3);
166
+ }
167
+
168
+ .plant {
169
+ position: absolute;
170
+ bottom: 0;
171
+ width: 40px;
172
+ height: 150px;
173
+ background: linear-gradient(to top, #2e8b57, #3cb371);
174
+ clip-path: polygon(
175
+ 50% 0%,
176
+ 60% 20%,
177
+ 70% 30%,
178
+ 60% 40%,
179
+ 70% 50%,
180
+ 60% 60%,
181
+ 70% 70%,
182
+ 60% 80%,
183
+ 50% 90%,
184
+ 40% 80%,
185
+ 30% 70%,
186
+ 40% 60%,
187
+ 30% 50%,
188
+ 40% 40%,
189
+ 30% 30%,
190
+ 40% 20%,
191
+ 50% 0%
192
+ );
193
+ z-index: 1;
194
+ }
195
+
196
+ .rock {
197
+ position: absolute;
198
+ bottom: 0;
199
+ width: 80px;
200
+ height: 40px;
201
+ background: linear-gradient(to top, #696969, #808080);
202
+ border-radius: 50% 50% 0 0;
203
+ z-index: 2;
204
+ }
205
+
206
+ .controls {
207
+ position: fixed;
208
+ bottom: 20px;
209
+ right: 20px;
210
+ background: rgba(0, 0, 0, 0.5);
211
+ padding: 10px;
212
+ border-radius: 10px;
213
+ z-index: 100;
214
+ backdrop-filter: blur(5px);
215
+ display: flex;
216
+ flex-direction: column;
217
+ gap: 5px;
218
+ }
219
+
220
+ .control-group {
221
+ display: flex;
222
+ gap: 5px;
223
+ }
224
+
225
+ .toggle-btn {
226
+ background: rgba(255, 255, 255, 0.2);
227
+ border: none;
228
+ color: white;
229
+ padding: 8px 12px;
230
+ border-radius: 5px;
231
+ cursor: pointer;
232
+ transition: all 0.3s;
233
+ display: flex;
234
+ align-items: center;
235
+ justify-content: center;
236
+ }
237
+
238
+ .toggle-btn:hover {
239
+ background: rgba(255, 255, 255, 0.4);
240
+ }
241
+
242
+ .toggle-btn.active {
243
+ background: #3b82f6;
244
+ }
245
+
246
+ .stats {
247
+ position: fixed;
248
+ top: 20px;
249
+ right: 20px;
250
+ background: rgba(0, 0, 0, 0.5);
251
+ padding: 10px;
252
+ border-radius: 10px;
253
+ z-index: 100;
254
+ backdrop-filter: blur(5px);
255
+ color: white;
256
+ font-family: Arial, sans-serif;
257
+ font-size: 14px;
258
+ }
259
+
260
+ .food {
261
+ position: absolute;
262
+ width: 10px;
263
+ height: 10px;
264
+ background-color: #FF6347;
265
+ border-radius: 50%;
266
+ z-index: 5;
267
+ }
268
+
269
+ /* Fish type specific styles */
270
+ .fish-type-1 .fish-body {
271
+ background: linear-gradient(135deg, #FF6347 0%, #FF8C00 100%);
272
+ }
273
+ .fish-type-2 .fish-body {
274
+ background: linear-gradient(135deg, #4682B4 0%, #87CEEB 100%);
275
+ }
276
+ .fish-type-3 .fish-body {
277
+ background: linear-gradient(135deg, #32CD32 0%, #ADFF2F 100%);
278
+ }
279
+ .fish-type-4 .fish-body {
280
+ background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
281
+ }
282
+ .fish-type-5 .fish-body {
283
+ background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
284
+ }
285
+ .fish-type-6 .fish-body {
286
+ background: linear-gradient(135deg, #9370DB 0%, #BA55D3 100%);
287
+ }
288
+ .fish-type-7 .fish-body {
289
+ background: linear-gradient(135deg, #20B2AA 0%, #00FFFF 100%);
290
+ }
291
+ .fish-type-8 .fish-body {
292
+ background: linear-gradient(135deg, #FF4500 0%, #FF8C00 50%, #FF4500 100%);
293
+ }
294
+ .fish-type-9 .fish-body {
295
+ background: linear-gradient(135deg, #4B0082 0%, #9400D3 100%);
296
+ }
297
+ .fish-type-10 .fish-body {
298
+ background: linear-gradient(135deg, #008000 0%, #00FF00 100%);
299
+ }
300
+ </style>
301
+ </head>
302
+ <body class="bg-blue-900 overflow-hidden h-screen w-screen m-0 p-0">
303
+ <div id="fish-tank" class="relative h-full w-full">
304
+ <!-- Elements will be added here by JS -->
305
+ </div>
306
+
307
+ <div class="stats">
308
+ <div>Fish: <span id="fish-count">0</span></div>
309
+ <div>Food: <span id="food-count">0</span></div>
310
+ <div>Species: <span id="species-count">0</span></div>
311
+ </div>
312
+
313
+ <div class="controls">
314
+ <div class="control-group">
315
+ <button id="toggle-bubbles" class="toggle-btn active" title="Toggle Bubbles">
316
+ <i class="fas fa-water"></i>
317
+ </button>
318
+ <button id="toggle-fish" class="toggle-btn active" title="Toggle Fish">
319
+ <i class="fas fa-fish"></i>
320
+ </button>
321
+ <button id="toggle-plants" class="toggle-btn active" title="Toggle Plants">
322
+ <i class="fas fa-leaf"></i>
323
+ </button>
324
+ </div>
325
+ <div class="control-group">
326
+ <button id="toggle-rocks" class="toggle-btn active" title="Toggle Rocks">
327
+ <i class="fas fa-mountain"></i>
328
+ </button>
329
+ <button id="toggle-lights" class="toggle-btn active" title="Toggle Lights">
330
+ <i class="fas fa-lightbulb"></i>
331
+ </button>
332
+ <button id="add-fish" class="toggle-btn" title="Add Fish">
333
+ <i class="fas fa-plus"></i>
334
+ </button>
335
+ </div>
336
+ <div class="control-group">
337
+ <button id="add-food" class="toggle-btn" title="Add Food">
338
+ <i class="fas fa-utensils"></i>
339
+ </button>
340
+ <button id="add-special-fish" class="toggle-btn" title="Add Special Fish">
341
+ <i class="fas fa-star"></i>
342
+ </button>
343
+ </div>
344
+ </div>
345
+
346
+ <script>
347
+ document.addEventListener('DOMContentLoaded', function() {
348
+ const tank = document.getElementById('fish-tank');
349
+ const fishCountElement = document.getElementById('fish-count');
350
+ const foodCountElement = document.getElementById('food-count');
351
+ const speciesCountElement = document.getElementById('species-count');
352
+
353
+ let bubblesEnabled = true;
354
+ let fishEnabled = true;
355
+ let plantsEnabled = true;
356
+ let rocksEnabled = true;
357
+ let lightsEnabled = true;
358
+
359
+ let fishList = [];
360
+ let foodList = [];
361
+ let speciesSet = new Set();
362
+
363
+ // Fish class with enhanced variations
364
+ class Fish {
365
+ constructor(special = false) {
366
+ this.element = document.createElement('div');
367
+ this.element.className = 'fish';
368
+
369
+ // Random fish type (1-10)
370
+ this.type = special ?
371
+ Math.floor(Math.random() * 3) + 8 : // Special types 8-10
372
+ Math.floor(Math.random() * 7) + 1; // Regular types 1-7
373
+
374
+ this.element.classList.add(`fish-type-${this.type}`);
375
+
376
+ this.size = Math.random() * 30 + 30;
377
+ this.speed = Math.random() * 0.5 + 0.5;
378
+ this.top = Math.random() * 80 + 10;
379
+ this.direction = Math.random() > 0.5 ? 1 : -1; // 1 for right, -1 for left
380
+ this.x = Math.random() * (window.innerWidth - 100) + 50;
381
+ this.y = this.top / 100 * window.innerHeight;
382
+ this.width = this.size;
383
+ this.height = this.size;
384
+ this.hunger = 0;
385
+ this.growth = 1;
386
+ this.target = null;
387
+ this.changeDirectionTimer = 0;
388
+ this.changeDirectionInterval = Math.random() * 3000 + 2000; // 2-5 seconds
389
+
390
+ this.element.style.width = `${this.width}px`;
391
+ this.element.style.height = `${this.height}px`;
392
+ this.element.style.top = `${this.y}px`;
393
+ this.element.style.left = `${this.x}px`;
394
+
395
+ // Flip fish if going left
396
+ if (this.direction === -1) {
397
+ this.element.style.transform = 'scaleX(-1)';
398
+ }
399
+
400
+ const fishBody = document.createElement('div');
401
+ fishBody.className = 'fish-body';
402
+
403
+ const fishTail = document.createElement('div');
404
+ fishTail.className = 'fish-tail';
405
+ fishTail.style.borderRightColor = this.getTailColor();
406
+
407
+ const fishEye = document.createElement('div');
408
+ fishEye.className = 'fish-eye';
409
+
410
+ const fishPupil = document.createElement('div');
411
+ fishPupil.className = 'fish-pupil';
412
+ fishEye.appendChild(fishPupil);
413
+
414
+ const fishFin = document.createElement('div');
415
+ fishFin.className = 'fish-fin';
416
+ fishFin.style.backgroundColor = this.getFinColor();
417
+
418
+ const fishDorsalFin = document.createElement('div');
419
+ fishDorsalFin.className = 'fish-dorsal-fin';
420
+ fishDorsalFin.style.backgroundColor = this.getFinColor();
421
+
422
+ const fishMouth = document.createElement('div');
423
+ fishMouth.className = 'fish-mouth';
424
+
425
+ fishBody.appendChild(fishTail);
426
+ fishBody.appendChild(fishEye);
427
+ fishBody.appendChild(fishFin);
428
+ fishBody.appendChild(fishDorsalFin);
429
+ fishBody.appendChild(fishMouth);
430
+
431
+ // Add patterns based on fish type
432
+ this.addPatterns(fishBody);
433
+
434
+ this.element.appendChild(fishBody);
435
+
436
+ tank.appendChild(this.element);
437
+ fishList.push(this);
438
+ speciesSet.add(this.type);
439
+ updateFishCount();
440
+ updateSpeciesCount();
441
+
442
+ this.animationId = null;
443
+ this.animate();
444
+ }
445
+
446
+ getTailColor() {
447
+ // Return slightly darker color for tail
448
+ const tailColors = [
449
+ '#D4532B', '#36648B', '#2AAD2A', '#D4B700', '#D45391',
450
+ '#7B58C7', '#1A9282', '#D43A00', '#3D0066', '#006600'
451
+ ];
452
+ return tailColors[this.type - 1];
453
+ }
454
+
455
+ getFinColor() {
456
+ // Return slightly lighter color for fins
457
+ const finColors = [
458
+ '#FF8C69', '#69A3D1', '#69FF69', '#FFE769', '#FF8CB9',
459
+ '#B08CFF', '#69E3D1', '#FF8C69', '#8C69D1', '#69D169'
460
+ ];
461
+ return finColors[this.type - 1];
462
+ }
463
+
464
+ addPatterns(fishBody) {
465
+ // Add different patterns based on fish type
466
+ switch(this.type) {
467
+ case 1: // Orange with stripes
468
+ const stripe1 = document.createElement('div');
469
+ stripe1.className = 'fish-stripe';
470
+ stripe1.style.top = '30%';
471
+ fishBody.appendChild(stripe1);
472
+
473
+ const stripe2 = document.createElement('div');
474
+ stripe2.className = 'fish-stripe';
475
+ stripe2.style.top = '50%';
476
+ fishBody.appendChild(stripe2);
477
+ break;
478
+
479
+ case 2: // Blue with spots
480
+ for (let i = 0; i < 5; i++) {
481
+ const spot = document.createElement('div');
482
+ spot.className = 'fish-spot';
483
+ spot.style.top = `${Math.random() * 60 + 20}%`;
484
+ spot.style.left = `${Math.random() * 60 + 20}%`;
485
+ fishBody.appendChild(spot);
486
+ }
487
+ break;
488
+
489
+ case 5: // Pink with heart spots
490
+ for (let i = 0; i < 3; i++) {
491
+ const heart = document.createElement('div');
492
+ heart.innerHTML = '❤️';
493
+ heart.style.position = 'absolute';
494
+ heart.style.fontSize = '8px';
495
+ heart.style.top = `${Math.random() * 60 + 20}%`;
496
+ heart.style.left = `${Math.random() * 60 + 20}%`;
497
+ fishBody.appendChild(heart);
498
+ }
499
+ break;
500
+
501
+ case 8: // Special - Tiger stripes
502
+ for (let i = 0; i < 5; i++) {
503
+ const stripe = document.createElement('div');
504
+ stripe.className = 'fish-stripe';
505
+ stripe.style.height = '6px';
506
+ stripe.style.backgroundColor = 'black';
507
+ stripe.style.top = `${i * 15 + 20}%`;
508
+ fishBody.appendChild(stripe);
509
+ }
510
+ break;
511
+
512
+ case 9: // Special - Purple with stars
513
+ for (let i = 0; i < 3; i++) {
514
+ const star = document.createElement('div');
515
+ star.innerHTML = '⭐';
516
+ star.style.position = 'absolute';
517
+ star.style.fontSize = '6px';
518
+ star.style.top = `${Math.random() * 60 + 20}%`;
519
+ star.style.left = `${Math.random() * 60 + 20}%`;
520
+ fishBody.appendChild(star);
521
+ }
522
+ break;
523
+
524
+ case 10: // Special - Green with leaf pattern
525
+ const leaf1 = document.createElement('div');
526
+ leaf1.innerHTML = '🍃';
527
+ leaf1.style.position = 'absolute';
528
+ leaf1.style.fontSize = '10px';
529
+ leaf1.style.top = '30%';
530
+ leaf1.style.left = '40%';
531
+ fishBody.appendChild(leaf1);
532
+
533
+ const leaf2 = document.createElement('div');
534
+ leaf2.innerHTML = '🍃';
535
+ leaf2.style.position = 'absolute';
536
+ leaf2.style.fontSize = '10px';
537
+ leaf2.style.top = '50%';
538
+ leaf2.style.left = '30%';
539
+ fishBody.appendChild(leaf2);
540
+ break;
541
+ }
542
+ }
543
+
544
+ animate(timestamp) {
545
+ if (!fishEnabled) {
546
+ cancelAnimationFrame(this.animationId);
547
+ return;
548
+ }
549
+
550
+ // Update position based on direction
551
+ this.x += this.speed * this.direction;
552
+
553
+ // Check if fish is at tank boundaries
554
+ if (this.x <= 0) {
555
+ this.x = 0;
556
+ this.direction = 1;
557
+ this.element.style.transform = 'scaleX(1)';
558
+ } else if (this.x >= window.innerWidth - this.width) {
559
+ this.x = window.innerWidth - this.width;
560
+ this.direction = -1;
561
+ this.element.style.transform = 'scaleX(-1)';
562
+ }
563
+
564
+ // Random direction changes
565
+ this.changeDirectionTimer += 16; // assuming 60fps
566
+ if (this.changeDirectionTimer >= this.changeDirectionInterval) {
567
+ this.changeDirectionTimer = 0;
568
+ if (Math.random() < 0.3) { // 30% chance to change direction
569
+ this.direction *= -1;
570
+ this.element.style.transform = this.direction === 1 ? 'scaleX(1)' : 'scaleX(-1)';
571
+ }
572
+ }
573
+
574
+ // Check for food or smaller fish
575
+ if (!this.target) {
576
+ this.findTarget();
577
+ } else {
578
+ this.chaseTarget();
579
+ }
580
+
581
+ // Apply movement
582
+ this.element.style.left = `${this.x}px`;
583
+ this.element.style.top = `${this.y}px`;
584
+
585
+ // Random vertical movement
586
+ if (Math.random() < 0.05) {
587
+ this.y += (Math.random() - 0.5) * 5;
588
+ // Keep fish within tank bounds
589
+ this.y = Math.max(0, Math.min(window.innerHeight - this.height, this.y));
590
+ this.top = (this.y / window.innerHeight) * 100;
591
+ }
592
+
593
+ this.animationId = requestAnimationFrame((ts) => this.animate(ts));
594
+ }
595
+
596
+ findTarget() {
597
+ // Look for food first
598
+ for (let food of foodList) {
599
+ if (this.isCloseTo(food.x, food.y, 200)) {
600
+ this.target = food;
601
+ return;
602
+ }
603
+ }
604
+
605
+ // Then look for smaller fish
606
+ for (let otherFish of fishList) {
607
+ if (otherFish !== this &&
608
+ otherFish.growth < this.growth * 0.8 &&
609
+ this.isCloseTo(otherFish.x, otherFish.y, 300)) {
610
+ this.target = otherFish;
611
+ return;
612
+ }
613
+ }
614
+
615
+ // No target found, reset hunger
616
+ this.hunger = 0;
617
+ this.target = null;
618
+ }
619
+
620
+ chaseTarget() {
621
+ if (!this.target || !this.target.element) {
622
+ this.target = null;
623
+ return;
624
+ }
625
+
626
+ // Calculate direction to target
627
+ const dx = this.target.x - this.x;
628
+ const dy = this.target.y - this.y;
629
+ const distance = Math.sqrt(dx * dx + dy * dy);
630
+
631
+ // Move toward target
632
+ if (distance > 0) {
633
+ this.x += (dx / distance) * this.speed * 1.5;
634
+ this.y += (dy / distance) * this.speed * 1.5;
635
+
636
+ // Update direction based on movement
637
+ if (dx > 0 && this.direction === -1) {
638
+ this.direction = 1;
639
+ this.element.style.transform = 'scaleX(1)';
640
+ } else if (dx < 0 && this.direction === 1) {
641
+ this.direction = -1;
642
+ this.element.style.transform = 'scaleX(-1)';
643
+ }
644
+ }
645
+
646
+ // Check if reached target
647
+ if (distance < this.width / 2) {
648
+ this.eatTarget();
649
+ }
650
+ }
651
+
652
+ eatTarget() {
653
+ if (!this.target) return;
654
+
655
+ if (this.target instanceof Fish) {
656
+ // Eat another fish
657
+ this.target.remove();
658
+ this.growth += 0.2;
659
+ this.size *= 1.1;
660
+ this.width = this.size;
661
+ this.height = this.size;
662
+ this.element.style.width = `${this.width}px`;
663
+ this.element.style.height = `${this.height}px`;
664
+ } else {
665
+ // Eat food
666
+ this.target.remove();
667
+ this.growth += 0.05;
668
+ if (this.growth > 1.5) this.growth = 1.5;
669
+ }
670
+
671
+ this.target = null;
672
+ this.hunger = 0;
673
+ }
674
+
675
+ isCloseTo(x, y, radius) {
676
+ const dx = x - this.x;
677
+ const dy = y - this.y;
678
+ return (dx * dx + dy * dy) < radius * radius;
679
+ }
680
+
681
+ remove() {
682
+ cancelAnimationFrame(this.animationId);
683
+ this.element.remove();
684
+ fishList = fishList.filter(f => f !== this);
685
+
686
+ // Update species count if this was the last of its type
687
+ const typesRemaining = new Set(fishList.map(f => f.type));
688
+ if (!typesRemaining.has(this.type)) {
689
+ speciesSet.delete(this.type);
690
+ updateSpeciesCount();
691
+ }
692
+
693
+ updateFishCount();
694
+ }
695
+ }
696
+
697
+ // Food class
698
+ class Food {
699
+ constructor(x, y) {
700
+ this.element = document.createElement('div');
701
+ this.element.className = 'food';
702
+
703
+ this.x = x || Math.random() * window.innerWidth;
704
+ this.y = y || Math.random() * window.innerHeight * 0.8 + window.innerHeight * 0.2;
705
+
706
+ this.element.style.left = `${this.x}px`;
707
+ this.element.style.top = `${this.y}px`;
708
+
709
+ tank.appendChild(this.element);
710
+ foodList.push(this);
711
+ updateFoodCount();
712
+
713
+ // Food disappears after some time
714
+ this.timeout = setTimeout(() => {
715
+ this.remove();
716
+ }, 20000);
717
+ }
718
+
719
+ remove() {
720
+ clearTimeout(this.timeout);
721
+ this.element.remove();
722
+ foodList = foodList.filter(f => f !== this);
723
+ updateFoodCount();
724
+ }
725
+ }
726
+
727
+ // Create bubbles
728
+ function createBubble() {
729
+ if (!bubblesEnabled) return;
730
+
731
+ const bubble = document.createElement('div');
732
+ bubble.className = 'bubble';
733
+
734
+ const size = Math.random() * 20 + 10;
735
+ const left = Math.random() * 100;
736
+ const duration = Math.random() * 15 + 10;
737
+ const delay = Math.random() * 5;
738
+
739
+ bubble.style.width = `${size}px`;
740
+ bubble.style.height = `${size}px`;
741
+ bubble.style.left = `${left}%`;
742
+ bubble.style.bottom = '0';
743
+ bubble.style.animationDuration = `${duration}s`;
744
+ bubble.style.animationDelay = `${delay}s`;
745
+
746
+ tank.appendChild(bubble);
747
+
748
+ // Remove bubble after animation completes
749
+ setTimeout(() => {
750
+ bubble.remove();
751
+ }, duration * 1000);
752
+ }
753
+
754
+ // Create plants
755
+ function createPlants() {
756
+ if (!plantsEnabled) return;
757
+
758
+ for (let i = 0; i < 10; i++) {
759
+ const plant = document.createElement('div');
760
+ plant.className = 'plant';
761
+
762
+ const left = Math.random() * 100;
763
+ const height = Math.random() * 100 + 100;
764
+
765
+ plant.style.left = `${left}%`;
766
+ plant.style.height = `${height}px`;
767
+
768
+ tank.appendChild(plant);
769
+ }
770
+ }
771
+
772
+ // Create rocks
773
+ function createRocks() {
774
+ if (!rocksEnabled) return;
775
+
776
+ for (let i = 0; i < 5; i++) {
777
+ const rock = document.createElement('div');
778
+ rock.className = 'rock';
779
+
780
+ const left = Math.random() * 100;
781
+ const width = Math.random() * 100 + 50;
782
+ const height = Math.random() * 40 + 20;
783
+
784
+ rock.style.left = `${left}%`;
785
+ rock.style.width = `${width}px`;
786
+ rock.style.height = `${height}px`;
787
+
788
+ tank.appendChild(rock);
789
+ }
790
+ }
791
+
792
+ // Toggle lights
793
+ function toggleLights() {
794
+ if (lightsEnabled) {
795
+ document.body.classList.remove('bg-blue-900');
796
+ document.body.classList.add('bg-blue-950');
797
+ } else {
798
+ document.body.classList.remove('bg-blue-950');
799
+ document.body.classList.add('bg-blue-900');
800
+ }
801
+ }
802
+
803
+ // Update fish count display
804
+ function updateFishCount() {
805
+ fishCountElement.textContent = fishList.length;
806
+ }
807
+
808
+ // Update food count display
809
+ function updateFoodCount() {
810
+ foodCountElement.textContent = foodList.length;
811
+ }
812
+
813
+ // Update species count display
814
+ function updateSpeciesCount() {
815
+ speciesCountElement.textContent = speciesSet.size;
816
+ }
817
+
818
+ // Initialize tank
819
+ function initTank() {
820
+ // Clear existing elements
821
+ while (tank.firstChild) {
822
+ tank.removeChild(tank.firstChild);
823
+ }
824
+
825
+ fishList = [];
826
+ foodList = [];
827
+ speciesSet = new Set();
828
+
829
+ if (plantsEnabled) createPlants();
830
+ if (rocksEnabled) createRocks();
831
+
832
+ // Start fish and bubbles
833
+ if (fishEnabled) {
834
+ for (let i = 0; i < 5; i++) {
835
+ setTimeout(() => new Fish(), i * 2000);
836
+ }
837
+ }
838
+
839
+ if (bubblesEnabled) {
840
+ setInterval(createBubble, 500);
841
+ }
842
+
843
+ updateFishCount();
844
+ updateFoodCount();
845
+ updateSpeciesCount();
846
+ }
847
+
848
+ // Control buttons
849
+ document.getElementById('toggle-bubbles').addEventListener('click', function() {
850
+ bubblesEnabled = !bubblesEnabled;
851
+ this.classList.toggle('active');
852
+ });
853
+
854
+ document.getElementById('toggle-fish').addEventListener('click', function() {
855
+ fishEnabled = !fishEnabled;
856
+ this.classList.toggle('active');
857
+ if (fishEnabled) {
858
+ for (let i = 0; i < 3; i++) {
859
+ setTimeout(() => new Fish(), i * 1000);
860
+ }
861
+ } else {
862
+ fishList.forEach(fish => fish.remove());
863
+ }
864
+ });
865
+
866
+ document.getElementById('toggle-plants').addEventListener('click', function() {
867
+ plantsEnabled = !plantsEnabled;
868
+ this.classList.toggle('active');
869
+ if (plantsEnabled) {
870
+ createPlants();
871
+ } else {
872
+ document.querySelectorAll('.plant').forEach(plant => plant.remove());
873
+ }
874
+ });
875
+
876
+ document.getElementById('toggle-rocks').addEventListener('click', function() {
877
+ rocksEnabled = !rocksEnabled;
878
+ this.classList.toggle('active');
879
+ if (rocksEnabled) {
880
+ createRocks();
881
+ } else {
882
+ document.querySelectorAll('.rock').forEach(rock => rock.remove());
883
+ }
884
+ });
885
+
886
+ document.getElementById('toggle-lights').addEventListener('click', function() {
887
+ lightsEnabled = !lightsEnabled;
888
+ this.classList.toggle('active');
889
+ toggleLights();
890
+ });
891
+
892
+ document.getElementById('add-fish').addEventListener('click', function() {
893
+ new Fish();
894
+ });
895
+
896
+ document.getElementById('add-special-fish').addEventListener('click', function() {
897
+ new Fish(true); // Add special fish
898
+ });
899
+
900
+ document.getElementById('add-food').addEventListener('click', function(e) {
901
+ // Add food at random position
902
+ new Food();
903
+ });
904
+
905
+ // Add food when clicking on tank
906
+ tank.addEventListener('click', function(e) {
907
+ if (e.target === tank) {
908
+ new Food(e.clientX, e.clientY);
909
+ }
910
+ });
911
+
912
+ // Handle window resize
913
+ window.addEventListener('resize', function() {
914
+ fishList.forEach(fish => {
915
+ // Keep fish within new bounds
916
+ fish.x = Math.min(fish.x, window.innerWidth - fish.width);
917
+ fish.y = Math.min(fish.y, window.innerHeight - fish.height);
918
+ fish.element.style.left = `${fish.x}px`;
919
+ fish.element.style.top = `${fish.y}px`;
920
+ });
921
+
922
+ foodList.forEach(food => {
923
+ // Keep food within new bounds
924
+ food.x = Math.min(food.x, window.innerWidth);
925
+ food.y = Math.min(food.y, window.innerHeight);
926
+ food.element.style.left = `${food.x}px`;
927
+ food.element.style.top = `${food.y}px`;
928
+ });
929
+ });
930
+
931
+ // Initialize the tank
932
+ initTank();
933
+ toggleLights();
934
+ });
935
+ </script>
936
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=jofe34/absurd-aquarium" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
937
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ make fish unique, have a variety of variations of fins and colores multiple colors for some