mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Remove cancerous lightbar random code
This commit is contained in:
parent
f942e6cf6b
commit
090eac0539
1 changed files with 184 additions and 211 deletions
|
@ -145,17 +145,15 @@ function ParticlesCanvas() {
|
|||
|
||||
// Basic particle config
|
||||
const particleCount = 265;
|
||||
let imageParticleCount = particleCount;
|
||||
|
||||
// Holiday overrides
|
||||
let imageOverride: { image: string; sizeRange?: [number, number] }[] = [];
|
||||
const date = new Date();
|
||||
const month = date.getMonth();
|
||||
const day = date.getDate();
|
||||
if (
|
||||
(month === 11 && day >= 24 && day <= 26) ||
|
||||
Math.random() < 0.051 // 5.1%
|
||||
) {
|
||||
let imageParticleCount = particleCount;
|
||||
|
||||
switch (true) {
|
||||
case (month === 11 && day >= 24 && day <= 26) || Math.random() < 0.051:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/snowflake.svg",
|
||||
|
@ -167,15 +165,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount * 0.1;
|
||||
}
|
||||
break;
|
||||
|
||||
// Halloween overrides
|
||||
const month2 = date.getMonth();
|
||||
const day2 = date.getDate();
|
||||
if (
|
||||
(month2 === 9 && day2 >= 29 && day2 <= 31) ||
|
||||
Math.random() < 0.05 // 5%
|
||||
) {
|
||||
case (month === 9 && day >= 29 && day <= 31) || Math.random() < 0.05:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/ghost.png",
|
||||
|
@ -187,11 +179,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount * 0.0879;
|
||||
}
|
||||
break;
|
||||
|
||||
// Fish easter egg
|
||||
const shouldShowFishie = Math.random() < 0.1; // 10%
|
||||
if (shouldShowFishie) {
|
||||
case Math.random() < 0.1:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/fishie.png",
|
||||
|
@ -203,13 +193,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount * 0.075;
|
||||
}
|
||||
break;
|
||||
|
||||
// Weed easter egg
|
||||
const month3 = date.getMonth() + 1;
|
||||
const day3 = date.getDate();
|
||||
const shouldShowZa = (month3 === 4 && day3 === 20) || Math.random() < 0.25; // 25%
|
||||
if (shouldShowZa) {
|
||||
case (month === 4 && day === 20) || Math.random() < 0.25:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/weed.png",
|
||||
|
@ -217,11 +203,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 6.25;
|
||||
}
|
||||
break;
|
||||
|
||||
// Kitty easter egg
|
||||
const shouldShowCat = Math.random() < 0.2; // 20%
|
||||
if (shouldShowCat) {
|
||||
case Math.random() < 0.2:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/cat.png",
|
||||
|
@ -229,11 +213,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 6.6;
|
||||
}
|
||||
break;
|
||||
|
||||
// Movie & popcorn easter egg
|
||||
const shouldShowParaphernalia = Math.random() < 0.3; // 30%
|
||||
if (shouldShowParaphernalia) {
|
||||
case Math.random() < 0.3:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/camera.png",
|
||||
|
@ -245,11 +227,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 7.85;
|
||||
}
|
||||
break;
|
||||
|
||||
// Chicken easter egg
|
||||
const shouldShow4thDecor = Math.random() < 0.08; // 8%
|
||||
if (shouldShow4thDecor) {
|
||||
case Math.random() < 0.08:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/cock.png",
|
||||
|
@ -265,11 +245,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 9;
|
||||
}
|
||||
break;
|
||||
|
||||
// Money easter egg
|
||||
const shouldShowMoney = Math.random() < 0.06; // 6%
|
||||
if (shouldShowMoney) {
|
||||
case Math.random() < 0.06:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/money-sack.png",
|
||||
|
@ -285,11 +263,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 8.45;
|
||||
}
|
||||
break;
|
||||
|
||||
// Pirate easter egg
|
||||
const shouldShowPirate = Math.random() < 0.075; // 7.5%
|
||||
if (shouldShowPirate) {
|
||||
case Math.random() < 0.075:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/skull.png",
|
||||
|
@ -301,11 +277,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 10;
|
||||
}
|
||||
break;
|
||||
|
||||
// Dev easter egg
|
||||
const shouldShowCode = Math.random() < 0.03; // 3%
|
||||
if (shouldShowCode) {
|
||||
case Math.random() < 0.03:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/ts.png",
|
||||
|
@ -317,11 +291,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 9;
|
||||
}
|
||||
break;
|
||||
|
||||
// DUI easter egg
|
||||
const shouldShowFlix = Math.random() < 0.08; // 8%
|
||||
if (shouldShowFlix) {
|
||||
case Math.random() < 0.7:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/beer.png",
|
||||
|
@ -345,11 +317,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 11;
|
||||
}
|
||||
break;
|
||||
|
||||
// Gangster easter egg
|
||||
const shouldShowCowboy = Math.random() < 0.05; // 5%
|
||||
if (shouldShowCowboy) {
|
||||
case Math.random() < 0.05:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/auto-gun.png",
|
||||
|
@ -361,11 +331,9 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 11.6;
|
||||
}
|
||||
break;
|
||||
|
||||
// Star easter egg
|
||||
const shouldShowStars = Math.random() < 0.15; // 15%
|
||||
if (shouldShowStars) {
|
||||
case Math.random() < 0.15:
|
||||
imageOverride = [
|
||||
{
|
||||
image: "/lightbar-images/star.png",
|
||||
|
@ -373,6 +341,11 @@ function ParticlesCanvas() {
|
|||
},
|
||||
];
|
||||
imageParticleCount = particleCount / 6.6;
|
||||
break;
|
||||
|
||||
default:
|
||||
// Default case
|
||||
break;
|
||||
}
|
||||
|
||||
// HOIST THE SAIL (of particles)!
|
||||
|
|
Loading…
Reference in a new issue