Remove duplicate function

This commit is contained in:
Idrees Hassan
2025-10-26 18:03:15 -04:00
parent fe497a4020
commit 938b139298
8 changed files with 92 additions and 155 deletions

View File

@@ -14,7 +14,8 @@ import {
isMobile,
log,
debug,
error
error,
getLayer
} from './shared.js';
import {
SPRITE,
@@ -802,21 +803,6 @@ Promise.all([
save();
}
/**
* @param {string[][]} array
* @param {number} sprite
* @param {number} [width]
* @returns {string[][]}
*/
function getLayer(array, sprite, width = SPRITE_WIDTH) {
// From an array of a horizontal sprite sheet, get the layer for a specific sprite
const layer = [];
for (let y = 0; y < width; y++) {
layer.push(array[y].slice(sprite * width, (sprite + 1) * width));
}
return layer;
}
/**
* Update the birds location from the start to the target location on a parabolic path
* @param {number} speed The speed of the bird along the path
@@ -874,7 +860,6 @@ Promise.all([
}
function focusOnGround() {
console.log("Focusing on ground");
focusedElement = null;
focusedBounds = { left: 0, right: window.innerWidth, top: getSafeWindowHeight() };
flyTo(Math.random() * window.innerWidth, 0);