Hide birb on fullscreen sites

This commit is contained in:
Idrees Hassan
2025-09-10 18:01:14 -04:00
parent 3831fb0515
commit 25ad5c87d1
4 changed files with 23 additions and 2 deletions

7
dist/birb.js vendored
View File

@@ -1309,6 +1309,13 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
function update() {
ticks++;
// Hide bird if the browser is fullscreen
if (document.fullscreenElement) {
hideBirb();
// Won't be restored on fullscreen exit
}
if (currentState === States.IDLE) {
if (Math.random() < 1 / (60 * 3) && currentAnimation !== Animations.HEART && !isMenuOpen()) {
hop();