cleaner atlas code + unglaso added
This commit is contained in:
parent
36722f3f00
commit
ff3046ca1b
2 changed files with 6 additions and 13 deletions
19
atlas.js
19
atlas.js
|
@ -39,19 +39,12 @@ function atlasClick() {
|
||||||
atlas_img.style.zIndex = 1;
|
atlas_img.style.zIndex = 1;
|
||||||
atlas.classList.add("atlas");
|
atlas.classList.add("atlas");
|
||||||
let roll = Math.random();
|
let roll = Math.random();
|
||||||
let rollchance = 0.03;
|
let rollchance = 0.0069;
|
||||||
if (roll < rollchance) {
|
let rollList = ["lmoa","doom","agony","enraged","sunglaso","thonk","unglaso"];
|
||||||
atlas_img.src = "/media/memes/lmoa.png";
|
for (let i = rollList.length-1; i > -1; i--) {
|
||||||
} else if (roll < 2*rollchance) {
|
if (roll < (i+1) * rollchance) {
|
||||||
atlas_img.src = "/media/memes/doom.png";
|
atlas_img.src = "./media/memes/" + rollList[i] + ".png";
|
||||||
} else if (roll < 3*rollchance) {
|
}
|
||||||
atlas_img.src = "/media/memes/agony.png";
|
|
||||||
} else if (roll < 4*rollchance) {
|
|
||||||
atlas_img.src = "/media/memes/enraged.png";
|
|
||||||
} else if (roll < 5*rollchance) {
|
|
||||||
atlas_img.src = "/media/memes/sunglaso.png";
|
|
||||||
} else if (roll < 6*rollchance) {
|
|
||||||
atlas_img.src = "/media/memes/thonk.png";
|
|
||||||
}
|
}
|
||||||
atlas.appendChild(atlas_img);
|
atlas.appendChild(atlas_img);
|
||||||
atlas.style = "background-image: radial-gradient(closest-side, #" + Math.round(255*Math.random()).toString(16)+Math.round(255*Math.random()).toString(16)+Math.round(255*Math.random()).toString(16) + " 0%," + "#121516 120%);";
|
atlas.style = "background-image: radial-gradient(closest-side, #" + Math.round(255*Math.random()).toString(16)+Math.round(255*Math.random()).toString(16)+Math.round(255*Math.random()).toString(16) + " 0%," + "#121516 120%);";
|
||||||
|
|
BIN
media/memes/unglaso.png
Normal file
BIN
media/memes/unglaso.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
Loading…
Reference in a new issue