-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
488 lines (447 loc) · 21.6 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Primogem Counters</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description"
content="Primogem counter is just not about counting Primogem! take a look and make this website useful">
<meta name="keywords" content="primogem, counter, genshin, genshinImpact, impact, genshin impact">
<meta name="author" content="Rang rang">
<link rel="icon" type="image/png" href="assets/img/icon.png">
<link rel="stylesheet" href="assets/css/main.css">
<style>
body,
html {
margin: 0;
padding: 0;
overflow: hidden;
height: 100%;
background: transparent;
/* Menghapus background agar hanya menggunakan elemen canvas sebagai background */
}
body {
display: flex;
justify-content: center;
align-items: center;
}
canvas {
background: black;
position: fixed;
top: 0;
left: 0;
z-index: -1;
/* Mengatur z-index untuk memastikan canvas berada di belakang elemen lain */
}
:root {
--clr-primary: #3080e9;
--clr-header: rgba(47, 119, 187, 0.5);
--clr-accent: #f5ce5d;
--clr-neutral: #fff;
--clr-neutral-dark: #2d323f;
--clr-font: #fff;
--spacing: 1em;
}
.intro--banner::after {
background-color: var(--clr-accent);
}
input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
border: 2px solid var(--clr-accent);
font: inherit;
color: var(--clr-accent);
width: 1.5em;
aspect-ratio: 1;
border-radius: 50%;
}
input[type="checkbox"]:checked {
/* background-color: #7c96ff; */
background-image: url(assets/img/icon-box.png);
background-size: 80%;
background-position: center;
background-repeat: no-repeat;
}
.btn-success {
display: inline-block;
font-weight: 400;
color: #212529;
text-align: center;
border: 1px solid transparent;
padding: .375rem .75rem;
font-size: 1rem;
line-height: 1.5;
border-radius: .25rem;
color: #fff;
background-color: #00b42a;
}
.btn-success:hover {
background-color: #009723;
}
.btn-fail {
display: inline-block;
font-weight: 400;
color: #212529;
text-align: center;
border: 1px solid transparent;
padding: .375rem .75rem;
font-size: 1rem;
line-height: 1.5;
border-radius: .25rem;
color: #fff;
background-color: #b40000;
}
.btn-fail:hover {
background-color: #970000;
}
@media (max-width: 767) and (min-width: 601px) and (max-height: 680px) {
.fonter {
font-size: 70%;
}
}
</style>
</head>
<body>
<canvas id="spaceCanvas"></canvas>
<div class="perspective effect-rotate-left">
<div class="container">
<div class="outer-nav--return"></div>
<div id="viewport" class="l-viewport">
<div class="l-wrapper">
<nav class="l-side-nav">
<ul class="side-nav">
<li class="is-active"></li>
<li></li>
<li></li>
<li></li>
</ul>
</nav>
<ul class="l-main-content main-content">
<li class="l-section section section--is-active">
<div class="intro">
<div class="intro--banner">
<!-- <button class="cta">About Rang Rang
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 150 118" style="enable-background:new 0 0 150 118;" xml:space="preserve">
<g transform="translate(0.000000,118.000000) scale(0.100000,-0.100000)">
<path d="M870,1167c-34-17-55-57-46-90c3-15,81-100,194-211l187-185l-565-1c-431,0-571-3-590-13c-55-28-64-94-18-137c21-20,33-20,597-20h575l-192-193C800,103,794,94,849,39c20-20,39-29,61-29c28,0,63,30,298,262c147,144,272,271,279,282c30,51,23,60-219,304C947,1180,926,1196,870,1167z"/>
</g>
</svg>
<span class="btn-background"></span>
</button> -->
<div class="fonter">
<h1>Primogem<br>Counter</h1>
<h3>Total Primogems</h3>
<h1>= <span id="total"></span></h1>
</div>
<img src="assets/img/navia.png" alt="Navia">
</div>
<div class="intro--options">
<span>
<div class="work-request--information">
<div class="information-name">
<h3>Day: </h3>
<!-- <input id="days" type="number" spellcheck="false" min="1" value="1"> -->
<span id="days" style="user-select: none; margin-bottom: 10px;">1</span>
<!-- <label for="name" style="margin-left: 15px;">Days</label> -->
</div>
</div>
<div style="margin-top: 50px;">
<button class="btn-success" onclick="incrementDays(1)">+1</button>
<button class="btn-fail" onclick="decrementDays(1)">-1</button>
<button class="btn-success" onclick="incrementDays(10)">+10</button>
<button class="btn-fail" onclick="decrementDays(10)">-10</button>
<button class="btn-fail" style="margin-top: 10px;" onclick="resetDays()">Reset All</button>
</div>
</span>
<span>
<h3><label for="welkin">Blessing of the welkin moon?</label></h3>
<input type="checkbox" id="welkin" />
</span>
<span>
<h3><label for="bp">Battle Pass?</label></h3>
<input type="checkbox" id="bp" />
</span>
<span>
<h3>Spiral Abyss</h3>
<div style="display: flex; gap: 25px;">
<div>
<label for="floor9">Fl 9:</label><br>
<input type="radio" name="floor9" id="floor9_0" value="0" onclick="updatePrimogems(0)"> <label
for="floor9_0">0</label><br>
<input type="radio" name="floor9" id="floor9_3" value="50" onclick="updatePrimogems(50)"> <label
for="floor9_3">3</label><br>
<input type="radio" name="floor9" id="floor9_6" value="100" onclick="updatePrimogems(100)">
<label for="floor9_6">6</label><br>
<input type="radio" name="floor9" id="floor9_9" value="200" onclick="updatePrimogems(200)">
<label for="floor9_9">9</label><br>
</div>
<div>
<label for="floor10">Fl 10:</label><br>
<input type="radio" name="floor10" id="floor10_0" value="0" onclick="updatePrimogems(0)"> <label
for="floor10_0">0</label><br>
<input type="radio" name="floor10" id="floor10_3" value="50" onclick="updatePrimogems(50)">
<label for="floor10_3">3</label><br>
<input type="radio" name="floor10" id="floor10_6" value="100" onclick="updatePrimogems(100)">
<label for="floor10_6">6</label><br>
<input type="radio" name="floor10" id="floor10_9" value="200" onclick="updatePrimogems(200)">
<label for="floor10_9">9</label><br>
</div>
<div>
<label for="floor11">Fl 11:</label><br>
<input type="radio" name="floor11" id="floor11_0" value="0" onclick="updatePrimogems(0)"> <label
for="floor11_0">0</label><br>
<input type="radio" name="floor11" id="floor11_3" value="50" onclick="updatePrimogems(50)">
<label for="floor11_3">3</label><br>
<input type="radio" name="floor11" id="floor11_6" value="100" onclick="updatePrimogems(100)">
<label for="floor11_6">6</label><br>
<input type="radio" name="floor11" id="floor11_9" value="200" onclick="updatePrimogems(200)">
<label for="floor11_9">9</label><br>
</div>
<div>
<label for="floor12">Fl 12:</label><br>
<input type="radio" name="floor12" id="floor12_0" value="0" onclick="updatePrimogems(0)"> <label
for="floor12_0">0</label><br>
<input type="radio" name="floor12" id="floor12_3" value="50" onclick="updatePrimogems(50)">
<label for="floor12_3">3</label><br>
<input type="radio" name="floor12" id="floor12_6" value="100" onclick="updatePrimogems(100)">
<label for="floor12_6">6</label><br>
<input type="radio" name="floor12" id="floor12_9" value="200" onclick="updatePrimogems(200)">
<label for="floor12_9">9</label><br>
</div>
</div>
</span>
<span>
</span>
</div>
<p>
<span id="days-value">1</span> Day Daily Commision,
<span id="welkin-value">Without</span> Blessing of The Welkin Moon,
<span id="bp-value">No</span> Battle Pass
</p>
<!--
<p style="color: red;">Warning: if your using <span style="font-weight: bolder; font-style: italic;">Tiktok</span> browser
it have a little bug, suggested using other browser</p> -->
</div>
</li>
<li class="l-section section">
<div class="intro">
<div class="intro--banner">
<h1>Gacha<br>Counter</h1>
<!-- <button class="cta">Hire Us
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 150 118" style="enable-background:new 0 0 150 118;" xml:space="preserve">
<g transform="translate(0.000000,118.000000) scale(0.100000,-0.100000)">
<path d="M870,1167c-34-17-55-57-46-90c3-15,81-100,194-211l187-185l-565-1c-431,0-571-3-590-13c-55-28-64-94-18-137c21-20,33-20,597-20h575l-192-193C800,103,794,94,849,39c20-20,39-29,61-29c28,0,63,30,298,262c147,144,272,271,279,282c30,51,23,60-219,304C947,1180,926,1196,870,1167z"/>
</g>
</svg>
<span class="btn-background"></span>
</button> -->
<div>
<h3>Total Gacha</h3>
<h1>= <span id="totalz">0</span> Gacha</h1>
</div>
<img src="assets/img/hutao.png" alt="Hutao">
</div>
<div class="intro--options">
<span style="width: 100%;">
<div class="work-request--information">
<div class="information-name">
<p>Primogem:</p>
<input type="number" id="primogemz" name="primogemz" min="0" value="0" readonly>
<!-- <label for="primogemz" style="margin-left: 25px;">Primogem</label> -->
</div>
</div>
<div style="margin-top: 80px;">
<button class="btn-success" onclick="incrementPrimogems(160)">+160</button>
<button class="btn-fail" onclick="decrementPrimogems(160)">-160</button>
<button class="btn-success" onclick="incrementPrimogems(1600)">+1600</button>
<button class="btn-fail" onclick="decrementPrimogems(1600)">-1600</button>
<button class="btn-fail" style="margin-top: 10px;" onclick="resetPrimogems()">Reset
Primogem</button>
</div>
</span>
</div>
<p style="color: red; margin-top: 80px;">Warning: if your using <span
style="font-weight: bolder;">Tiktok</span> browser it have a little bug, suggested using other
browser</p>
</div>
</li>
<li class="l-section section">
<div class="work">
<h2>Creator</h2>
<div class="work--lockup">
<ul class="slider">
<!-- <li class="slider--item slider--item-left">
<a href="#0">
<div class="slider--item-image">
<img src="assets/img/work-victory.jpg" alt="Rang Rang">
</div>
<p class="slider--item-title">Rang Rang</p>
<p class="slider--item-description">Lorem ipsum dolor sit amet, consectetur adipisicing elit sed
do.</p>
</a>
</li> -->
<li class="slider--item slider--item-center">
<!-- <a href="https://rang-rang.netlify.app/"> -->
<div class="slider--item-image">
<img src="assets/img/icon.png" alt="Rang Rang">
</div>
<p class="slider--item-title">Rang Rang</p>
<p class="slider--item-description">Streamer, HoyoCreators, Programmer, Bug Hunter</p>
<!-- </a> -->
</li>
<!-- <li class="slider--item slider--item-right">
<a href="#0">
<div class="slider--item-image">
<img src="assets/img/work-alex-nowak.jpg" alt="Alex Nowak">
</div>
<p class="slider--item-title">Alex Nowak</p>
<p class="slider--item-description">Lorem ipsum dolor sit amet, consectetur adipisicing elit sed
do.</p>
</a>
</li> -->
</ul>
<!-- <div class="slider--prev">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 150 118"
style="enable-background:new 0 0 150 118;" xml:space="preserve">
<g transform="translate(0.000000,118.000000) scale(0.100000,-0.100000)">
<path d="M561,1169C525,1155,10,640,3,612c-3-13,1-36,8-52c8-15,134-145,281-289C527,41,562,10,590,10c22,0,41,9,61,29
c55,55,49,64-163,278L296,510h575c564,0,576,0,597,20c46,43,37,109-18,137c-19,10-159,13-590,13l-565,1l182,180
c101,99,187,188,193,199c16,30,12,57-12,84C631,1174,595,1183,561,1169z" />
</g>
</svg>
</div>
<div class="slider--next">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 150 118"
style="enable-background:new 0 0 150 118;" xml:space="preserve">
<g transform="translate(0.000000,118.000000) scale(0.100000,-0.100000)">
<path
d="M870,1167c-34-17-55-57-46-90c3-15,81-100,194-211l187-185l-565-1c-431,0-571-3-590-13c-55-28-64-94-18-137c21-20,33-20,597-20h575l-192-193C800,103,794,94,849,39c20-20,39-29,61-29c28,0,63,30,298,262c147,144,272,271,279,282c30,51,23,60-219,304C947,1180,926,1196,870,1167z" />
</g>
</svg>
</div> -->
</div>
</div>
</li>
<li class="l-section section">
<div class="about">
<div class="about--banner">
<h2>Thank You<br>For using<br>Primogem<br>Counter</h2>
<a href="https://rang-rangrang.web.app/">Rang Rang Bio Profile
<span>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 150 118"
style="enable-background:new 0 0 150 118;" xml:space="preserve">
<g transform="translate(0.000000,118.000000) scale(0.100000,-0.100000)">
<path
d="M870,1167c-34-17-55-57-46-90c3-15,81-100,194-211l187-185l-565-1c-431,0-571-3-590-13c-55-28-64-94-18-137c21-20,33-20,597-20h575l-192-193C800,103,794,94,849,39c20-20,39-29,61-29c28,0,63,30,298,262c147,144,272,271,279,282c30,51,23,60-219,304C947,1180,926,1196,870,1167z" />
</g>
</svg>
</span>
</a>
<img src="assets/img/about.png" style="z-index: -1;" alt="Thank You">
</div>
</div>
</li>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/js/vendor/jquery-2.2.4.min.js"><\/script>')</script>
<script src="assets/js/functions-min.js"></script>
<script src="assets/js/counter.js"></script>
<script src="assets/js/vibrate.js"></script>
<script>
var canvas = document.getElementById('spaceCanvas');
var ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
var stars = [];
var numStars = 400;
for (var i = 0; i < numStars; i++) {
stars.push({
x: Math.random() * canvas.width,
y: Math.random() * canvas.height,
radius: Math.random() * 1.5,
color: randomColor(), // Menggunakan fungsi randomColor untuk warna yang bervariasi
speed: Math.random() * 0.2
});
}
// Menambahkan bintang-bintang jatuh unik
var uniqueStars = [];
var numUniqueStars = Math.floor(Math.random() * 8) + 2; // Menambahkan 2-5 bintang jatuh unik
for (var i = 0; i < numUniqueStars; i++) {
uniqueStars.push({
x: Math.random() * canvas.width,
y: -20, // Mulai dari atas layar
radius: Math.random() * 1.5 + 1, // Ukuran yang sedikit lebih besar
color: '#ED0740', // Warna kuning
speed: Math.random() * 0.5 + 0.2, // Kecepatan yang beragam
tailLength: Math.random() * 20 + 10, // Panjang ekor
tailColor: 'rgba(255, 215, 0, 0.2)', // Warna ekor kuning transparan
directionX: Math.random() > 0.5 ? 1 : -1 // Arah horizontal acak
});
}
function drawStars() {
for (var i = 0; i < numStars; i++) {
var star = stars[i];
ctx.beginPath();
ctx.arc(star.x, star.y, star.radius, 0, Math.PI * 2);
ctx.fillStyle = star.color;
ctx.fill();
}
}
function drawUniqueStars() {
for (var i = 0; i < numUniqueStars; i++) {
var star = uniqueStars[i];
ctx.beginPath();
ctx.arc(star.x, star.y, star.radius, 0, Math.PI * 2);
ctx.fillStyle = star.color;
ctx.fill();
// Menggambar ekor bintang
ctx.beginPath();
ctx.moveTo(star.x, star.y);
ctx.lineTo(star.x - star.tailLength * star.directionX, star.y - star.tailLength); // Mengubah arah ekor
ctx.strokeStyle = star.tailColor;
ctx.stroke();
}
}
function updateStars() {
for (var i = 0; i < numStars; i++) {
var star = stars[i];
star.x += star.speed;
if (star.x > canvas.width) {
star.x = 0;
}
}
}
function updateUniqueStars() {
for (var i = 0; i < numUniqueStars; i++) {
var star = uniqueStars[i];
star.x += star.speed * star.directionX;
star.y += star.speed;
// Jika bintang jatuh unik keluar dari layar, kembalikan ke posisi atas
if (star.x > canvas.width || star.x < 0 || star.y > canvas.height) {
star.x = Math.random() * canvas.width;
star.y = -20;
}
}
}
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
updateStars();
drawStars();
updateUniqueStars(); // Memanggil fungsi update untuk bintang jatuh unik
drawUniqueStars(); // Memanggil fungsi gambar untuk bintang jatuh unik
requestAnimationFrame(animate);
}
// Fungsi untuk menghasilkan warna acak
function randomColor() {
var colors = ['#FFFFFF', '#CCCCCC', '#AAAAAA', '#777777', '#555555'];
return colors[Math.floor(Math.random() * colors.length)];
}
animate();
</script>
</script>
</body>
</html>