1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Add gangster easter egg

This commit is contained in:
Cooper Ransom 2024-03-11 21:06:27 -04:00
parent 0f81ef90fb
commit 924da37b4e
3 changed files with 16 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -347,6 +347,22 @@ function ParticlesCanvas() {
imageParticleCount = particleCount / 11;
}
// Gangster easter egg
const shouldShowCowboy = Math.random() < 0.98; // 3%
if (shouldShowCowboy) {
imageOverride = [
{
image: "/lightbar-images/auto-gun.png",
sizeRange: [28, 36] as [number, number],
},
{
image: "/lightbar-images/gun.png",
sizeRange: [23, 30] as [number, number],
},
];
imageParticleCount = particleCount / 11.6;
}
// HOIST THE SAIL (of particles)!
for (let i = 0; i < particleCount; i += 1) {
const isImageParticle = imageOverride && i <= imageParticleCount;