mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +01:00
Add gangster easter egg
This commit is contained in:
parent
0f81ef90fb
commit
924da37b4e
3 changed files with 16 additions and 0 deletions
BIN
public/lightbar-images/auto-gun.png
Normal file
BIN
public/lightbar-images/auto-gun.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
public/lightbar-images/gun.png
Normal file
BIN
public/lightbar-images/gun.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -347,6 +347,22 @@ function ParticlesCanvas() {
|
||||||
imageParticleCount = particleCount / 11;
|
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)!
|
// HOIST THE SAIL (of particles)!
|
||||||
for (let i = 0; i < particleCount; i += 1) {
|
for (let i = 0; i < particleCount; i += 1) {
|
||||||
const isImageParticle = imageOverride && i <= imageParticleCount;
|
const isImageParticle = imageOverride && i <= imageParticleCount;
|
||||||
|
|
Loading…
Reference in a new issue