-
-
Notifications
You must be signed in to change notification settings - Fork 72
/
emojiland.html
259 lines (225 loc) Β· 7.9 KB
/
emojiland.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ChaosWeb - Emoji Land</title>
<style>
body, html {
margin: 0;
padding: 0;
overflow: hidden;
background: black;
}
#emoji-land {
width: 100vw;
height: 100vh;
position: relative;
}
canvas {
display: block;
width: 100%;
height: 100%;
}
.emoji {
position: absolute;
font-size: 30px;
transition: transform 0.5s ease;
cursor: pointer;
}
.emoji:hover {
transform: scale(5) !important;
}
@keyframes randomChangeSize {
0% { font-size: 20px; }
50% { font-size: 70px; }
100% { font-size: 20px; }
}
@keyframes glitchBackground {
0% { background-color: black; }
33% { background-color: lightgrey; }
66% { background-color: darkgrey; }
100% { background-color: black; }
}
body {
animation: glitchBackground 0.4s infinite;
}
#welcome {
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.8);
z-index: 1000;
animation: fadeOut 1s forwards 4s;
font-family: 'Courier New', Courier, monospace;
}
.neon {
color: #ffff00;
font-size: 50px;
text-shadow: 0 0 10px #ffff6c, 0 0 20px #ffff96, 0 0 30px #ffffcf, 0 0 40px #ffffff;
display: inline-block;
}
@keyframes fadeOut {
0% { opacity: 1; }
100% { opacity: 0; visibility: hidden; }
}
@keyframes charEnter {
0% { transform: rotate(360deg) scale(0); opacity: 0; }
100% { transform: rotate(0deg) scale(1); opacity: 1; }
}
@keyframes alignText {
0% { transform: translateY(50px); opacity: 0; }
100% { transform: translateY(0); opacity: 1; }
}
.char {
opacity: 0;
animation: charEnter 2s ease forwards;
display: inline-block;
}
.char.show {
animation: charEnter 2s ease forwards, alignText 1s ease-in-out 1.5s forwards;
}
</style>
</head>
<body>
<div id="welcome">
<span class="neon">
<span class="char">W</span>
<span class="char">e</span>
<span class="char">l</span>
<span class="char">c</span>
<span class="char">o</span>
<span class="char">m</span>
<span class="char">e</span>
<span> </span>
<span class="char">t</span>
<span class="char">o</span>
<span> </span>
<span class="char">E</span>
<span class="char">m</span>
<span class="char">o</span>
<span class="char">j</span>
<span class="char">i</span>
<span>-</span>
<span class="char">L</span>
<span class="char">a</span>
<span class="char">n</span>
<span class="char">d</span>
</span>
</div>
<section id="emoji-land">
<canvas id="emojiCanvas"></canvas>
</section>
<!-- Audio files -->
<audio id="dramaticSound" src="sfx/Emoji-Land/drammatic-cinematic-glitch.mp3"></audio>
<audio id="introMusic" src="sfx/Emoji-Land/intro-music-black-box-dirty-glitch.mp3"></audio>
<audio id="electricWasps" src="sfx/Emoji-Land/electric-wasps.mp3"></audio>
<audio id="hurricane" src="sfx/Emoji-Land/hurricane.mp3"></audio>
<audio id="glitchSound" src="sfx/Emoji-Land/glitch-sound.mp3"></audio>
<audio id="digitalChaos" src="sfx/Emoji-Land/digital-chaos.mp3"></audio>
<script>
const canvas = document.getElementById('emojiCanvas');
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const emojis = ['π', 'π€―', 'π±', 'π»', 'π€', 'π½', 'π', 'π΅βπ«', 'π', 'π€‘', 'π₯', 'πͺοΈ', 'π₯',
'π', 'π£', 'β‘', 'π€ͺ', 'π', 'π', 'πΎ', 'π¬', 'π€’', 'π ', 'πΈ', 'π', 'πΊ', 'π₯΄', 'π«¨'];
const audioFiles = {
'π': 'introMusic',
'π€―': 'dramaticSound',
'π±': 'electricWasps',
'π»': 'hurricane',
'π€': 'electricWasps',
'π½': 'hurricane',
'π': 'dramaticSound',
'π΅βπ«': 'electricWasps',
'π': 'hurricane',
'π€‘': 'glitchSound',
'π₯': 'digitalChaos',
'πͺοΈ': 'hurricane',
'π₯': 'dramaticSound',
'π': 'hurricane',
'π£': 'dramaticSound',
'β‘': 'electricWasps',
'π€ͺ': 'digitalChaos',
'π': 'introMusic',
'π': 'dramaticSound',
'πΎ': 'electricWasps',
'π¬': 'hurricane',
'π€’': 'glitchSound',
'π ': 'digitalChaos',
'πΈ': 'introMusic',
'π': 'dramaticSound',
'πΊ': 'electricWasps',
'π₯΄': 'hurricane',
'π«¨': 'glitchSound',
};
let emojiElements = [];
function randomPosition(max) {
return Math.floor(Math.random() * max);
}
function randomEmoji() {
return emojis[Math.floor(Math.random() * emojis.length)];
}
function randomDuration() {
return (Math.random() * 3) + 1;
}
function createEmoji() {
const emojiDiv = document.createElement('div');
const emoji = randomEmoji();
emojiDiv.innerHTML = emoji;
emojiDiv.classList.add('emoji');
emojiDiv.style.left = `${randomPosition(window.innerWidth)}px`;
emojiDiv.style.top = `${randomPosition(window.innerHeight)}px`;
emojiDiv.style.fontSize = '20px'; // Initial size
emojiDiv.style.animation = `randomChangeSize ${randomDuration()}s infinite ease-in-out`; // Each emoji animates differently
const audioId = audioFiles[emoji];
const audio = document.getElementById(audioId);
emojiDiv.onmouseover = () => {
if (audio) {
audio.currentTime = 0;
audio.play();
}
};
emojiDiv.onmouseout = () => {
if (audio) {
audio.pause();
audio.currentTime = 0;
}
};
document.body.appendChild(emojiDiv);
emojiElements.push(emojiDiv);
}
function populateEmojiLand() {
for (let i = 0; i < 120; i++) {
createEmoji();
}
}
function showWelcomeText() {
const chars = document.querySelectorAll('.char');
let delay = 0;
chars.forEach(char => {
setTimeout(() => {
char.classList.add('show');
}, delay);
delay += 150;
});
}
const welcomeScreen = document.getElementById('welcome');
setTimeout(() => {
welcomeScreen.style.visibility = 'visible';
showWelcomeText();
}, 500);
setTimeout(() => {
populateEmojiLand();
}, 4000);
window.addEventListener('resize', () => {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
});
</script>
</body>
</html>