From b9dc0506b1c3e7856d2eb13ec106ab8c92820542 Mon Sep 17 00:00:00 2001 From: Idrees Hassan Date: Wed, 13 Aug 2025 22:55:58 -0400 Subject: [PATCH] Align bird with hopped upon elements --- birb.js | 4 ++-- dist/birb.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/birb.js b/birb.js index 9ef9cbe..8b669ec 100644 --- a/birb.js +++ b/birb.js @@ -1029,7 +1029,7 @@ Promise.all([loadSpritesheetPixels(SPRITE_SHEET_URI), loadSpritesheetPixels(DECO petStack.shift(); } const pets = petStack.filter((time) => Date.now() - time < 1000).length; - if (pets >= 4) { + if (pets >= 3) { setAnimation(Animations.HEART); // Clear the stack petStack = []; @@ -1074,7 +1074,7 @@ Promise.all([loadSpritesheetPixels(SPRITE_SHEET_URI), loadSpritesheetPixels(DECO // Update the bird's position if (currentState === States.IDLE) { if (focusedElement !== null) { - birdY = getFocusedElementY(); + birdY = getFocusedElementY() - 0.5; if (!isWithinHorizontalBounds()) { focusOnGround(); } diff --git a/dist/birb.js b/dist/birb.js index 3424f9b..1113c99 100644 --- a/dist/birb.js +++ b/dist/birb.js @@ -1029,7 +1029,7 @@ Promise.all([loadSpritesheetPixels(SPRITE_SHEET_URI), loadSpritesheetPixels(DECO petStack.shift(); } const pets = petStack.filter((time) => Date.now() - time < 1000).length; - if (pets >= 4) { + if (pets >= 3) { setAnimation(Animations.HEART); // Clear the stack petStack = []; @@ -1074,7 +1074,7 @@ Promise.all([loadSpritesheetPixels(SPRITE_SHEET_URI), loadSpritesheetPixels(DECO // Update the bird's position if (currentState === States.IDLE) { if (focusedElement !== null) { - birdY = getFocusedElementY(); + birdY = getFocusedElementY() - 0.5; if (!isWithinHorizontalBounds()) { focusOnGround(); }