diff --git a/dist/birb.js b/dist/birb.js index c62d152..799d569 100644 --- a/dist/birb.js +++ b/dist/birb.js @@ -7,7 +7,7 @@ }; /** Indicators for parts of the base bird sprite sheet */ - const Sprite = { + const SPRITE = { THEME_HIGHLIGHT: "theme-highlight", TRANSPARENT: "transparent", OUTLINE: "outline", @@ -30,23 +30,23 @@ /** @type {Record} */ const SPRITE_SHEET_COLOR_MAP = { - "transparent": Sprite.TRANSPARENT, - "#ffffff": Sprite.BORDER, - "#000000": Sprite.OUTLINE, - "#010a19": Sprite.BEAK, - "#190301": Sprite.EYE, - "#af8e75": Sprite.FOOT, - "#639bff": Sprite.FACE, - "#99e550": Sprite.HOOD, - "#d95763": Sprite.NOSE, - "#f8b143": Sprite.BELLY, - "#ec8637": Sprite.UNDERBELLY, - "#578ae6": Sprite.WING, - "#326ed9": Sprite.WING_EDGE, - "#c82e2e": Sprite.HEART, - "#501a1a": Sprite.HEART_BORDER, - "#ff6b6b": Sprite.HEART_SHINE, - "#373737": Sprite.FEATHER_SPINE, + "transparent": SPRITE.TRANSPARENT, + "#ffffff": SPRITE.BORDER, + "#000000": SPRITE.OUTLINE, + "#010a19": SPRITE.BEAK, + "#190301": SPRITE.EYE, + "#af8e75": SPRITE.FOOT, + "#639bff": SPRITE.FACE, + "#99e550": SPRITE.HOOD, + "#d95763": SPRITE.NOSE, + "#f8b143": SPRITE.BELLY, + "#ec8637": SPRITE.UNDERBELLY, + "#578ae6": SPRITE.WING, + "#326ed9": SPRITE.WING_EDGE, + "#c82e2e": SPRITE.HEART, + "#501a1a": SPRITE.HEART_BORDER, + "#ff6b6b": SPRITE.HEART_SHINE, + "#373737": SPRITE.FEATHER_SPINE, }; class BirdType { @@ -60,20 +60,20 @@ this.name = name; this.description = description; const defaultColors = { - [Sprite.TRANSPARENT]: "transparent", - [Sprite.OUTLINE]: "#000000", - [Sprite.BORDER]: "#ffffff", - [Sprite.BEAK]: "#000000", - [Sprite.EYE]: "#000000", - [Sprite.HEART]: "#c82e2e", - [Sprite.HEART_BORDER]: "#501a1a", - [Sprite.HEART_SHINE]: "#ff6b6b", - [Sprite.FEATHER_SPINE]: "#373737", - [Sprite.HOOD]: colors.face, - [Sprite.NOSE]: colors.face, + [SPRITE.TRANSPARENT]: "transparent", + [SPRITE.OUTLINE]: "#000000", + [SPRITE.BORDER]: "#ffffff", + [SPRITE.BEAK]: "#000000", + [SPRITE.EYE]: "#000000", + [SPRITE.HEART]: "#c82e2e", + [SPRITE.HEART_BORDER]: "#501a1a", + [SPRITE.HEART_SHINE]: "#ff6b6b", + [SPRITE.FEATHER_SPINE]: "#373737", + [SPRITE.HOOD]: colors.face, + [SPRITE.NOSE]: colors.face, }; /** @type {Record} */ - this.colors = { ...defaultColors, ...colors, [Sprite.THEME_HIGHLIGHT]: colors[Sprite.THEME_HIGHLIGHT] ?? colors.hood ?? colors.face }; + this.colors = { ...defaultColors, ...colors, [SPRITE.THEME_HIGHLIGHT]: colors[SPRITE.THEME_HIGHLIGHT] ?? colors.hood ?? colors.face }; this.tags = tags; } } @@ -82,127 +82,127 @@ const SPECIES = { bluebird: new BirdType("Eastern Bluebird", "Native to North American and very social, though can be timid around people.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#639bff", - [Sprite.BELLY]: "#f8b143", - [Sprite.UNDERBELLY]: "#ec8637", - [Sprite.WING]: "#578ae6", - [Sprite.WING_EDGE]: "#326ed9", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#639bff", + [SPRITE.BELLY]: "#f8b143", + [SPRITE.UNDERBELLY]: "#ec8637", + [SPRITE.WING]: "#578ae6", + [SPRITE.WING_EDGE]: "#326ed9", }), shimaEnaga: new BirdType("Shima Enaga", "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#ffffff", - [Sprite.BELLY]: "#ebe9e8", - [Sprite.UNDERBELLY]: "#ebd9d0", - [Sprite.WING]: "#f3d3c1", - [Sprite.WING_EDGE]: "#2d2d2dff", - [Sprite.THEME_HIGHLIGHT]: "#d7ac93", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#ffffff", + [SPRITE.BELLY]: "#ebe9e8", + [SPRITE.UNDERBELLY]: "#ebd9d0", + [SPRITE.WING]: "#f3d3c1", + [SPRITE.WING_EDGE]: "#2d2d2dff", + [SPRITE.THEME_HIGHLIGHT]: "#d7ac93", }), tuftedTitmouse: new BirdType("Tufted Titmouse", "Native to the eastern United States, full of personality, and notably my wife's favorite bird.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#c7cad7", - [Sprite.BELLY]: "#e4e5eb", - [Sprite.UNDERBELLY]: "#d7cfcb", - [Sprite.WING]: "#b1b5c5", - [Sprite.WING_EDGE]: "#9d9fa9", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#c7cad7", + [SPRITE.BELLY]: "#e4e5eb", + [SPRITE.UNDERBELLY]: "#d7cfcb", + [SPRITE.WING]: "#b1b5c5", + [SPRITE.WING_EDGE]: "#9d9fa9", }, ["tuft"]), europeanRobin: new BirdType("European Robin", "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#ffaf34", - [Sprite.HOOD]: "#aaa094", - [Sprite.BELLY]: "#ffaf34", - [Sprite.UNDERBELLY]: "#babec2", - [Sprite.WING]: "#aaa094", - [Sprite.WING_EDGE]: "#888580", - [Sprite.THEME_HIGHLIGHT]: "#ffaf34", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#ffaf34", + [SPRITE.HOOD]: "#aaa094", + [SPRITE.BELLY]: "#ffaf34", + [SPRITE.UNDERBELLY]: "#babec2", + [SPRITE.WING]: "#aaa094", + [SPRITE.WING_EDGE]: "#888580", + [SPRITE.THEME_HIGHLIGHT]: "#ffaf34", }), redCardinal: new BirdType("Red Cardinal", "Native to the eastern United States, this strikingly red bird is hard to miss.", { - [Sprite.BEAK]: "#d93619", - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#31353d", - [Sprite.HOOD]: "#e83a1b", - [Sprite.BELLY]: "#e83a1b", - [Sprite.UNDERBELLY]: "#dc3719", - [Sprite.WING]: "#d23215", - [Sprite.WING_EDGE]: "#b1321c", + [SPRITE.BEAK]: "#d93619", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#31353d", + [SPRITE.HOOD]: "#e83a1b", + [SPRITE.BELLY]: "#e83a1b", + [SPRITE.UNDERBELLY]: "#dc3719", + [SPRITE.WING]: "#d23215", + [SPRITE.WING_EDGE]: "#b1321c", }, ["tuft"]), americanGoldfinch: new BirdType("American Goldfinch", "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.", { - [Sprite.BEAK]: "#ffaf34", - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#fff255", - [Sprite.NOSE]: "#383838", - [Sprite.HOOD]: "#383838", - [Sprite.BELLY]: "#fff255", - [Sprite.UNDERBELLY]: "#f5ea63", - [Sprite.WING]: "#e8e079", - [Sprite.WING_EDGE]: "#191919", - [Sprite.THEME_HIGHLIGHT]: "#ffcc00" + [SPRITE.BEAK]: "#ffaf34", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#fff255", + [SPRITE.NOSE]: "#383838", + [SPRITE.HOOD]: "#383838", + [SPRITE.BELLY]: "#fff255", + [SPRITE.UNDERBELLY]: "#f5ea63", + [SPRITE.WING]: "#e8e079", + [SPRITE.WING_EDGE]: "#191919", + [SPRITE.THEME_HIGHLIGHT]: "#ffcc00" }), barnSwallow: new BirdType("Barn Swallow", "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#db7c4d", - [Sprite.BELLY]: "#f7e1c9", - [Sprite.UNDERBELLY]: "#ebc9a3", - [Sprite.WING]: "#2252a9", - [Sprite.WING_EDGE]: "#1c448b", - [Sprite.HOOD]: "#2252a9", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#db7c4d", + [SPRITE.BELLY]: "#f7e1c9", + [SPRITE.UNDERBELLY]: "#ebc9a3", + [SPRITE.WING]: "#2252a9", + [SPRITE.WING_EDGE]: "#1c448b", + [SPRITE.HOOD]: "#2252a9", }), mistletoebird: new BirdType("Mistletoebird", "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.", { - [Sprite.FOOT]: "#6c6a7c", - [Sprite.FACE]: "#352e6d", - [Sprite.BELLY]: "#fd6833", - [Sprite.UNDERBELLY]: "#e6e1d8", - [Sprite.WING]: "#342b7c", - [Sprite.WING_EDGE]: "#282065", + [SPRITE.FOOT]: "#6c6a7c", + [SPRITE.FACE]: "#352e6d", + [SPRITE.BELLY]: "#fd6833", + [SPRITE.UNDERBELLY]: "#e6e1d8", + [SPRITE.WING]: "#342b7c", + [SPRITE.WING_EDGE]: "#282065", }), redAvadavat: new BirdType("Red Avadavat", "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.", { - [Sprite.BEAK]: "#f71919", - [Sprite.FOOT]: "#af7575", - [Sprite.FACE]: "#cb092b", - [Sprite.BELLY]: "#ae1724", - [Sprite.UNDERBELLY]: "#831b24", - [Sprite.WING]: "#7e3030", - [Sprite.WING_EDGE]: "#490f0f", + [SPRITE.BEAK]: "#f71919", + [SPRITE.FOOT]: "#af7575", + [SPRITE.FACE]: "#cb092b", + [SPRITE.BELLY]: "#ae1724", + [SPRITE.UNDERBELLY]: "#831b24", + [SPRITE.WING]: "#7e3030", + [SPRITE.WING_EDGE]: "#490f0f", }), scarletRobin: new BirdType("Scarlet Robin", "Native to Australia, this striking robin can be found in Eucalyptus forests.", { - [Sprite.FOOT]: "#494949", - [Sprite.FACE]: "#3d3d3d", - [Sprite.BELLY]: "#fc5633", - [Sprite.UNDERBELLY]: "#dcdcdc", - [Sprite.WING]: "#2b2b2b", - [Sprite.WING_EDGE]: "#ebebeb", - [Sprite.THEME_HIGHLIGHT]: "#fc5633", + [SPRITE.FOOT]: "#494949", + [SPRITE.FACE]: "#3d3d3d", + [SPRITE.BELLY]: "#fc5633", + [SPRITE.UNDERBELLY]: "#dcdcdc", + [SPRITE.WING]: "#2b2b2b", + [SPRITE.WING_EDGE]: "#ebebeb", + [SPRITE.THEME_HIGHLIGHT]: "#fc5633", }), americanRobin: new BirdType("American Robin", "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.", { - [Sprite.BEAK]: "#e89f30", - [Sprite.FOOT]: "#9f8075", - [Sprite.FACE]: "#2d2d2d", - [Sprite.BELLY]: "#eb7a3a", - [Sprite.UNDERBELLY]: "#eb7a3a", - [Sprite.WING]: "#444444", - [Sprite.WING_EDGE]: "#232323", - [Sprite.THEME_HIGHLIGHT]: "#eb7a3a", + [SPRITE.BEAK]: "#e89f30", + [SPRITE.FOOT]: "#9f8075", + [SPRITE.FACE]: "#2d2d2d", + [SPRITE.BELLY]: "#eb7a3a", + [SPRITE.UNDERBELLY]: "#eb7a3a", + [SPRITE.WING]: "#444444", + [SPRITE.WING_EDGE]: "#232323", + [SPRITE.THEME_HIGHLIGHT]: "#eb7a3a", }), carolinaWren: new BirdType("Carolina Wren", "Native to the eastern United States, these little birds are known for their curious and energetic nature.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#edc7a9", - [Sprite.NOSE]: "#f7eee5", - [Sprite.HOOD]: "#c58a5b", - [Sprite.BELLY]: "#e1b796", - [Sprite.UNDERBELLY]: "#c79e7c", - [Sprite.WING]: "#c58a5b", - [Sprite.WING_EDGE]: "#866348", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#edc7a9", + [SPRITE.NOSE]: "#f7eee5", + [SPRITE.HOOD]: "#c58a5b", + [SPRITE.BELLY]: "#e1b796", + [SPRITE.UNDERBELLY]: "#c79e7c", + [SPRITE.WING]: "#c58a5b", + [SPRITE.WING_EDGE]: "#866348", }), }; @@ -240,7 +240,7 @@ this.pixels = layers[0].pixels.map(row => row.slice()); // Pad from top with transparent pixels while (this.pixels.length < maxHeight) { - this.pixels.unshift(new Array(this.pixels[0].length).fill(Sprite.TRANSPARENT)); + this.pixels.unshift(new Array(this.pixels[0].length).fill(SPRITE.TRANSPARENT)); } // Combine layers for (let i = 1; i < layers.length; i++) { @@ -249,7 +249,7 @@ let topMargin = maxHeight - layerPixels.length; for (let y = 0; y < layerPixels.length; y++) { for (let x = 0; x < layerPixels[y].length; x++) { - this.pixels[y + topMargin][x] = layerPixels[y][x] !== Sprite.TRANSPARENT ? layerPixels[y][x] : this.pixels[y + topMargin][x]; + this.pixels[y + topMargin][x] = layerPixels[y][x] !== SPRITE.TRANSPARENT ? layerPixels[y][x] : this.pixels[y + topMargin][x]; } } } @@ -798,7 +798,7 @@ const b = pixels[index + 2]; const a = pixels[index + 3]; if (a === 0) { - row.push(Sprite.TRANSPARENT); + row.push(SPRITE.TRANSPARENT); continue; } const hex = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`; @@ -808,7 +808,7 @@ } if (SPRITE_SHEET_COLOR_MAP[hex] === undefined) { error(`Unknown color: ${hex}`); - row.push(Sprite.TRANSPARENT); + row.push(SPRITE.TRANSPARENT); } row.push(SPRITE_SHEET_COLOR_MAP[hex]); } @@ -1711,7 +1711,7 @@ function switchSpecies(type) { currentSpecies = type; // Update CSS variable --birb-highlight to be wing color - document.documentElement.style.setProperty("--birb-highlight", SPECIES[type].colors[Sprite.THEME_HIGHLIGHT]); + document.documentElement.style.setProperty("--birb-highlight", SPECIES[type].colors[SPRITE.THEME_HIGHLIGHT]); save(); } diff --git a/dist/birb.user.js b/dist/birb.user.js index 6ea24a4..062d19f 100644 --- a/dist/birb.user.js +++ b/dist/birb.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Pocket Bird // @namespace https://idreesinc.com -// @version 2025.10.26.43 +// @version 2025.10.26.44 // @description birb // @author Idrees // @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js @@ -21,7 +21,7 @@ }; /** Indicators for parts of the base bird sprite sheet */ - const Sprite = { + const SPRITE = { THEME_HIGHLIGHT: "theme-highlight", TRANSPARENT: "transparent", OUTLINE: "outline", @@ -44,23 +44,23 @@ /** @type {Record} */ const SPRITE_SHEET_COLOR_MAP = { - "transparent": Sprite.TRANSPARENT, - "#ffffff": Sprite.BORDER, - "#000000": Sprite.OUTLINE, - "#010a19": Sprite.BEAK, - "#190301": Sprite.EYE, - "#af8e75": Sprite.FOOT, - "#639bff": Sprite.FACE, - "#99e550": Sprite.HOOD, - "#d95763": Sprite.NOSE, - "#f8b143": Sprite.BELLY, - "#ec8637": Sprite.UNDERBELLY, - "#578ae6": Sprite.WING, - "#326ed9": Sprite.WING_EDGE, - "#c82e2e": Sprite.HEART, - "#501a1a": Sprite.HEART_BORDER, - "#ff6b6b": Sprite.HEART_SHINE, - "#373737": Sprite.FEATHER_SPINE, + "transparent": SPRITE.TRANSPARENT, + "#ffffff": SPRITE.BORDER, + "#000000": SPRITE.OUTLINE, + "#010a19": SPRITE.BEAK, + "#190301": SPRITE.EYE, + "#af8e75": SPRITE.FOOT, + "#639bff": SPRITE.FACE, + "#99e550": SPRITE.HOOD, + "#d95763": SPRITE.NOSE, + "#f8b143": SPRITE.BELLY, + "#ec8637": SPRITE.UNDERBELLY, + "#578ae6": SPRITE.WING, + "#326ed9": SPRITE.WING_EDGE, + "#c82e2e": SPRITE.HEART, + "#501a1a": SPRITE.HEART_BORDER, + "#ff6b6b": SPRITE.HEART_SHINE, + "#373737": SPRITE.FEATHER_SPINE, }; class BirdType { @@ -74,20 +74,20 @@ this.name = name; this.description = description; const defaultColors = { - [Sprite.TRANSPARENT]: "transparent", - [Sprite.OUTLINE]: "#000000", - [Sprite.BORDER]: "#ffffff", - [Sprite.BEAK]: "#000000", - [Sprite.EYE]: "#000000", - [Sprite.HEART]: "#c82e2e", - [Sprite.HEART_BORDER]: "#501a1a", - [Sprite.HEART_SHINE]: "#ff6b6b", - [Sprite.FEATHER_SPINE]: "#373737", - [Sprite.HOOD]: colors.face, - [Sprite.NOSE]: colors.face, + [SPRITE.TRANSPARENT]: "transparent", + [SPRITE.OUTLINE]: "#000000", + [SPRITE.BORDER]: "#ffffff", + [SPRITE.BEAK]: "#000000", + [SPRITE.EYE]: "#000000", + [SPRITE.HEART]: "#c82e2e", + [SPRITE.HEART_BORDER]: "#501a1a", + [SPRITE.HEART_SHINE]: "#ff6b6b", + [SPRITE.FEATHER_SPINE]: "#373737", + [SPRITE.HOOD]: colors.face, + [SPRITE.NOSE]: colors.face, }; /** @type {Record} */ - this.colors = { ...defaultColors, ...colors, [Sprite.THEME_HIGHLIGHT]: colors[Sprite.THEME_HIGHLIGHT] ?? colors.hood ?? colors.face }; + this.colors = { ...defaultColors, ...colors, [SPRITE.THEME_HIGHLIGHT]: colors[SPRITE.THEME_HIGHLIGHT] ?? colors.hood ?? colors.face }; this.tags = tags; } } @@ -96,127 +96,127 @@ const SPECIES = { bluebird: new BirdType("Eastern Bluebird", "Native to North American and very social, though can be timid around people.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#639bff", - [Sprite.BELLY]: "#f8b143", - [Sprite.UNDERBELLY]: "#ec8637", - [Sprite.WING]: "#578ae6", - [Sprite.WING_EDGE]: "#326ed9", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#639bff", + [SPRITE.BELLY]: "#f8b143", + [SPRITE.UNDERBELLY]: "#ec8637", + [SPRITE.WING]: "#578ae6", + [SPRITE.WING_EDGE]: "#326ed9", }), shimaEnaga: new BirdType("Shima Enaga", "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#ffffff", - [Sprite.BELLY]: "#ebe9e8", - [Sprite.UNDERBELLY]: "#ebd9d0", - [Sprite.WING]: "#f3d3c1", - [Sprite.WING_EDGE]: "#2d2d2dff", - [Sprite.THEME_HIGHLIGHT]: "#d7ac93", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#ffffff", + [SPRITE.BELLY]: "#ebe9e8", + [SPRITE.UNDERBELLY]: "#ebd9d0", + [SPRITE.WING]: "#f3d3c1", + [SPRITE.WING_EDGE]: "#2d2d2dff", + [SPRITE.THEME_HIGHLIGHT]: "#d7ac93", }), tuftedTitmouse: new BirdType("Tufted Titmouse", "Native to the eastern United States, full of personality, and notably my wife's favorite bird.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#c7cad7", - [Sprite.BELLY]: "#e4e5eb", - [Sprite.UNDERBELLY]: "#d7cfcb", - [Sprite.WING]: "#b1b5c5", - [Sprite.WING_EDGE]: "#9d9fa9", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#c7cad7", + [SPRITE.BELLY]: "#e4e5eb", + [SPRITE.UNDERBELLY]: "#d7cfcb", + [SPRITE.WING]: "#b1b5c5", + [SPRITE.WING_EDGE]: "#9d9fa9", }, ["tuft"]), europeanRobin: new BirdType("European Robin", "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#ffaf34", - [Sprite.HOOD]: "#aaa094", - [Sprite.BELLY]: "#ffaf34", - [Sprite.UNDERBELLY]: "#babec2", - [Sprite.WING]: "#aaa094", - [Sprite.WING_EDGE]: "#888580", - [Sprite.THEME_HIGHLIGHT]: "#ffaf34", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#ffaf34", + [SPRITE.HOOD]: "#aaa094", + [SPRITE.BELLY]: "#ffaf34", + [SPRITE.UNDERBELLY]: "#babec2", + [SPRITE.WING]: "#aaa094", + [SPRITE.WING_EDGE]: "#888580", + [SPRITE.THEME_HIGHLIGHT]: "#ffaf34", }), redCardinal: new BirdType("Red Cardinal", "Native to the eastern United States, this strikingly red bird is hard to miss.", { - [Sprite.BEAK]: "#d93619", - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#31353d", - [Sprite.HOOD]: "#e83a1b", - [Sprite.BELLY]: "#e83a1b", - [Sprite.UNDERBELLY]: "#dc3719", - [Sprite.WING]: "#d23215", - [Sprite.WING_EDGE]: "#b1321c", + [SPRITE.BEAK]: "#d93619", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#31353d", + [SPRITE.HOOD]: "#e83a1b", + [SPRITE.BELLY]: "#e83a1b", + [SPRITE.UNDERBELLY]: "#dc3719", + [SPRITE.WING]: "#d23215", + [SPRITE.WING_EDGE]: "#b1321c", }, ["tuft"]), americanGoldfinch: new BirdType("American Goldfinch", "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.", { - [Sprite.BEAK]: "#ffaf34", - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#fff255", - [Sprite.NOSE]: "#383838", - [Sprite.HOOD]: "#383838", - [Sprite.BELLY]: "#fff255", - [Sprite.UNDERBELLY]: "#f5ea63", - [Sprite.WING]: "#e8e079", - [Sprite.WING_EDGE]: "#191919", - [Sprite.THEME_HIGHLIGHT]: "#ffcc00" + [SPRITE.BEAK]: "#ffaf34", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#fff255", + [SPRITE.NOSE]: "#383838", + [SPRITE.HOOD]: "#383838", + [SPRITE.BELLY]: "#fff255", + [SPRITE.UNDERBELLY]: "#f5ea63", + [SPRITE.WING]: "#e8e079", + [SPRITE.WING_EDGE]: "#191919", + [SPRITE.THEME_HIGHLIGHT]: "#ffcc00" }), barnSwallow: new BirdType("Barn Swallow", "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#db7c4d", - [Sprite.BELLY]: "#f7e1c9", - [Sprite.UNDERBELLY]: "#ebc9a3", - [Sprite.WING]: "#2252a9", - [Sprite.WING_EDGE]: "#1c448b", - [Sprite.HOOD]: "#2252a9", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#db7c4d", + [SPRITE.BELLY]: "#f7e1c9", + [SPRITE.UNDERBELLY]: "#ebc9a3", + [SPRITE.WING]: "#2252a9", + [SPRITE.WING_EDGE]: "#1c448b", + [SPRITE.HOOD]: "#2252a9", }), mistletoebird: new BirdType("Mistletoebird", "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.", { - [Sprite.FOOT]: "#6c6a7c", - [Sprite.FACE]: "#352e6d", - [Sprite.BELLY]: "#fd6833", - [Sprite.UNDERBELLY]: "#e6e1d8", - [Sprite.WING]: "#342b7c", - [Sprite.WING_EDGE]: "#282065", + [SPRITE.FOOT]: "#6c6a7c", + [SPRITE.FACE]: "#352e6d", + [SPRITE.BELLY]: "#fd6833", + [SPRITE.UNDERBELLY]: "#e6e1d8", + [SPRITE.WING]: "#342b7c", + [SPRITE.WING_EDGE]: "#282065", }), redAvadavat: new BirdType("Red Avadavat", "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.", { - [Sprite.BEAK]: "#f71919", - [Sprite.FOOT]: "#af7575", - [Sprite.FACE]: "#cb092b", - [Sprite.BELLY]: "#ae1724", - [Sprite.UNDERBELLY]: "#831b24", - [Sprite.WING]: "#7e3030", - [Sprite.WING_EDGE]: "#490f0f", + [SPRITE.BEAK]: "#f71919", + [SPRITE.FOOT]: "#af7575", + [SPRITE.FACE]: "#cb092b", + [SPRITE.BELLY]: "#ae1724", + [SPRITE.UNDERBELLY]: "#831b24", + [SPRITE.WING]: "#7e3030", + [SPRITE.WING_EDGE]: "#490f0f", }), scarletRobin: new BirdType("Scarlet Robin", "Native to Australia, this striking robin can be found in Eucalyptus forests.", { - [Sprite.FOOT]: "#494949", - [Sprite.FACE]: "#3d3d3d", - [Sprite.BELLY]: "#fc5633", - [Sprite.UNDERBELLY]: "#dcdcdc", - [Sprite.WING]: "#2b2b2b", - [Sprite.WING_EDGE]: "#ebebeb", - [Sprite.THEME_HIGHLIGHT]: "#fc5633", + [SPRITE.FOOT]: "#494949", + [SPRITE.FACE]: "#3d3d3d", + [SPRITE.BELLY]: "#fc5633", + [SPRITE.UNDERBELLY]: "#dcdcdc", + [SPRITE.WING]: "#2b2b2b", + [SPRITE.WING_EDGE]: "#ebebeb", + [SPRITE.THEME_HIGHLIGHT]: "#fc5633", }), americanRobin: new BirdType("American Robin", "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.", { - [Sprite.BEAK]: "#e89f30", - [Sprite.FOOT]: "#9f8075", - [Sprite.FACE]: "#2d2d2d", - [Sprite.BELLY]: "#eb7a3a", - [Sprite.UNDERBELLY]: "#eb7a3a", - [Sprite.WING]: "#444444", - [Sprite.WING_EDGE]: "#232323", - [Sprite.THEME_HIGHLIGHT]: "#eb7a3a", + [SPRITE.BEAK]: "#e89f30", + [SPRITE.FOOT]: "#9f8075", + [SPRITE.FACE]: "#2d2d2d", + [SPRITE.BELLY]: "#eb7a3a", + [SPRITE.UNDERBELLY]: "#eb7a3a", + [SPRITE.WING]: "#444444", + [SPRITE.WING_EDGE]: "#232323", + [SPRITE.THEME_HIGHLIGHT]: "#eb7a3a", }), carolinaWren: new BirdType("Carolina Wren", "Native to the eastern United States, these little birds are known for their curious and energetic nature.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#edc7a9", - [Sprite.NOSE]: "#f7eee5", - [Sprite.HOOD]: "#c58a5b", - [Sprite.BELLY]: "#e1b796", - [Sprite.UNDERBELLY]: "#c79e7c", - [Sprite.WING]: "#c58a5b", - [Sprite.WING_EDGE]: "#866348", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#edc7a9", + [SPRITE.NOSE]: "#f7eee5", + [SPRITE.HOOD]: "#c58a5b", + [SPRITE.BELLY]: "#e1b796", + [SPRITE.UNDERBELLY]: "#c79e7c", + [SPRITE.WING]: "#c58a5b", + [SPRITE.WING_EDGE]: "#866348", }), }; @@ -254,7 +254,7 @@ this.pixels = layers[0].pixels.map(row => row.slice()); // Pad from top with transparent pixels while (this.pixels.length < maxHeight) { - this.pixels.unshift(new Array(this.pixels[0].length).fill(Sprite.TRANSPARENT)); + this.pixels.unshift(new Array(this.pixels[0].length).fill(SPRITE.TRANSPARENT)); } // Combine layers for (let i = 1; i < layers.length; i++) { @@ -263,7 +263,7 @@ let topMargin = maxHeight - layerPixels.length; for (let y = 0; y < layerPixels.length; y++) { for (let x = 0; x < layerPixels[y].length; x++) { - this.pixels[y + topMargin][x] = layerPixels[y][x] !== Sprite.TRANSPARENT ? layerPixels[y][x] : this.pixels[y + topMargin][x]; + this.pixels[y + topMargin][x] = layerPixels[y][x] !== SPRITE.TRANSPARENT ? layerPixels[y][x] : this.pixels[y + topMargin][x]; } } } @@ -812,7 +812,7 @@ const b = pixels[index + 2]; const a = pixels[index + 3]; if (a === 0) { - row.push(Sprite.TRANSPARENT); + row.push(SPRITE.TRANSPARENT); continue; } const hex = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`; @@ -822,7 +822,7 @@ } if (SPRITE_SHEET_COLOR_MAP[hex] === undefined) { error(`Unknown color: ${hex}`); - row.push(Sprite.TRANSPARENT); + row.push(SPRITE.TRANSPARENT); } row.push(SPRITE_SHEET_COLOR_MAP[hex]); } @@ -1725,7 +1725,7 @@ function switchSpecies(type) { currentSpecies = type; // Update CSS variable --birb-highlight to be wing color - document.documentElement.style.setProperty("--birb-highlight", SPECIES[type].colors[Sprite.THEME_HIGHLIGHT]); + document.documentElement.style.setProperty("--birb-highlight", SPECIES[type].colors[SPRITE.THEME_HIGHLIGHT]); save(); } diff --git a/manifest.json b/manifest.json index f5cd6bc..1526bbe 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Pocket Bird", "description": "It's a bird, in your browser. What more could you want?", - "version": "2025.10.26.43", + "version": "2025.10.26.44", "homepage_url": "https://idreesinc.com", "content_scripts": [ { diff --git a/src/Frame.js b/src/Frame.js index 2400ec2..f9dd7e0 100644 --- a/src/Frame.js +++ b/src/Frame.js @@ -1,5 +1,5 @@ import { Directions } from './sharedConstants.js'; -import { Sprite, BirdType } from './sprites.js'; +import { SPRITE, BirdType } from './sprites.js'; import Layer from './layer.js'; class Frame { @@ -25,7 +25,7 @@ class Frame { this.pixels = layers[0].pixels.map(row => row.slice()); // Pad from top with transparent pixels while (this.pixels.length < maxHeight) { - this.pixels.unshift(new Array(this.pixels[0].length).fill(Sprite.TRANSPARENT)); + this.pixels.unshift(new Array(this.pixels[0].length).fill(SPRITE.TRANSPARENT)); } // Combine layers for (let i = 1; i < layers.length; i++) { @@ -34,7 +34,7 @@ class Frame { let topMargin = maxHeight - layerPixels.length; for (let y = 0; y < layerPixels.length; y++) { for (let x = 0; x < layerPixels[y].length; x++) { - this.pixels[y + topMargin][x] = layerPixels[y][x] !== Sprite.TRANSPARENT ? layerPixels[y][x] : this.pixels[y + topMargin][x]; + this.pixels[y + topMargin][x] = layerPixels[y][x] !== SPRITE.TRANSPARENT ? layerPixels[y][x] : this.pixels[y + topMargin][x]; } } } diff --git a/src/birb.js b/src/birb.js index 14c6962..1fd7e31 100644 --- a/src/birb.js +++ b/src/birb.js @@ -3,7 +3,7 @@ import { } from './sharedConstants.js'; import { - Sprite, + SPRITE, SPRITE_SHEET_COLOR_MAP, SPECIES, BirdType @@ -184,7 +184,7 @@ function loadSpriteSheetPixels(dataUri, templateColors = true) { const b = pixels[index + 2]; const a = pixels[index + 3]; if (a === 0) { - row.push(Sprite.TRANSPARENT); + row.push(SPRITE.TRANSPARENT); continue; } const hex = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`; @@ -194,7 +194,7 @@ function loadSpriteSheetPixels(dataUri, templateColors = true) { } if (SPRITE_SHEET_COLOR_MAP[hex] === undefined) { error(`Unknown color: ${hex}`); - row.push(Sprite.TRANSPARENT); + row.push(SPRITE.TRANSPARENT); } row.push(SPRITE_SHEET_COLOR_MAP[hex]); } @@ -1129,7 +1129,7 @@ Promise.all([ function switchSpecies(type) { currentSpecies = type; // Update CSS variable --birb-highlight to be wing color - document.documentElement.style.setProperty("--birb-highlight", SPECIES[type].colors[Sprite.THEME_HIGHLIGHT]); + document.documentElement.style.setProperty("--birb-highlight", SPECIES[type].colors[SPRITE.THEME_HIGHLIGHT]); save(); } diff --git a/src/frame.js b/src/frame.js index 2400ec2..f9dd7e0 100644 --- a/src/frame.js +++ b/src/frame.js @@ -1,5 +1,5 @@ import { Directions } from './sharedConstants.js'; -import { Sprite, BirdType } from './sprites.js'; +import { SPRITE, BirdType } from './sprites.js'; import Layer from './layer.js'; class Frame { @@ -25,7 +25,7 @@ class Frame { this.pixels = layers[0].pixels.map(row => row.slice()); // Pad from top with transparent pixels while (this.pixels.length < maxHeight) { - this.pixels.unshift(new Array(this.pixels[0].length).fill(Sprite.TRANSPARENT)); + this.pixels.unshift(new Array(this.pixels[0].length).fill(SPRITE.TRANSPARENT)); } // Combine layers for (let i = 1; i < layers.length; i++) { @@ -34,7 +34,7 @@ class Frame { let topMargin = maxHeight - layerPixels.length; for (let y = 0; y < layerPixels.length; y++) { for (let x = 0; x < layerPixels[y].length; x++) { - this.pixels[y + topMargin][x] = layerPixels[y][x] !== Sprite.TRANSPARENT ? layerPixels[y][x] : this.pixels[y + topMargin][x]; + this.pixels[y + topMargin][x] = layerPixels[y][x] !== SPRITE.TRANSPARENT ? layerPixels[y][x] : this.pixels[y + topMargin][x]; } } } diff --git a/src/sprites.js b/src/sprites.js index 14884d4..e1d808a 100644 --- a/src/sprites.js +++ b/src/sprites.js @@ -1,5 +1,5 @@ /** Indicators for parts of the base bird sprite sheet */ -export const Sprite = { +export const SPRITE = { THEME_HIGHLIGHT: "theme-highlight", TRANSPARENT: "transparent", OUTLINE: "outline", @@ -22,23 +22,23 @@ export const Sprite = { /** @type {Record} */ export const SPRITE_SHEET_COLOR_MAP = { - "transparent": Sprite.TRANSPARENT, - "#ffffff": Sprite.BORDER, - "#000000": Sprite.OUTLINE, - "#010a19": Sprite.BEAK, - "#190301": Sprite.EYE, - "#af8e75": Sprite.FOOT, - "#639bff": Sprite.FACE, - "#99e550": Sprite.HOOD, - "#d95763": Sprite.NOSE, - "#f8b143": Sprite.BELLY, - "#ec8637": Sprite.UNDERBELLY, - "#578ae6": Sprite.WING, - "#326ed9": Sprite.WING_EDGE, - "#c82e2e": Sprite.HEART, - "#501a1a": Sprite.HEART_BORDER, - "#ff6b6b": Sprite.HEART_SHINE, - "#373737": Sprite.FEATHER_SPINE, + "transparent": SPRITE.TRANSPARENT, + "#ffffff": SPRITE.BORDER, + "#000000": SPRITE.OUTLINE, + "#010a19": SPRITE.BEAK, + "#190301": SPRITE.EYE, + "#af8e75": SPRITE.FOOT, + "#639bff": SPRITE.FACE, + "#99e550": SPRITE.HOOD, + "#d95763": SPRITE.NOSE, + "#f8b143": SPRITE.BELLY, + "#ec8637": SPRITE.UNDERBELLY, + "#578ae6": SPRITE.WING, + "#326ed9": SPRITE.WING_EDGE, + "#c82e2e": SPRITE.HEART, + "#501a1a": SPRITE.HEART_BORDER, + "#ff6b6b": SPRITE.HEART_SHINE, + "#373737": SPRITE.FEATHER_SPINE, }; export class BirdType { @@ -52,20 +52,20 @@ export class BirdType { this.name = name; this.description = description; const defaultColors = { - [Sprite.TRANSPARENT]: "transparent", - [Sprite.OUTLINE]: "#000000", - [Sprite.BORDER]: "#ffffff", - [Sprite.BEAK]: "#000000", - [Sprite.EYE]: "#000000", - [Sprite.HEART]: "#c82e2e", - [Sprite.HEART_BORDER]: "#501a1a", - [Sprite.HEART_SHINE]: "#ff6b6b", - [Sprite.FEATHER_SPINE]: "#373737", - [Sprite.HOOD]: colors.face, - [Sprite.NOSE]: colors.face, + [SPRITE.TRANSPARENT]: "transparent", + [SPRITE.OUTLINE]: "#000000", + [SPRITE.BORDER]: "#ffffff", + [SPRITE.BEAK]: "#000000", + [SPRITE.EYE]: "#000000", + [SPRITE.HEART]: "#c82e2e", + [SPRITE.HEART_BORDER]: "#501a1a", + [SPRITE.HEART_SHINE]: "#ff6b6b", + [SPRITE.FEATHER_SPINE]: "#373737", + [SPRITE.HOOD]: colors.face, + [SPRITE.NOSE]: colors.face, }; /** @type {Record} */ - this.colors = { ...defaultColors, ...colors, [Sprite.THEME_HIGHLIGHT]: colors[Sprite.THEME_HIGHLIGHT] ?? colors.hood ?? colors.face }; + this.colors = { ...defaultColors, ...colors, [SPRITE.THEME_HIGHLIGHT]: colors[SPRITE.THEME_HIGHLIGHT] ?? colors.hood ?? colors.face }; this.tags = tags; } } @@ -74,126 +74,126 @@ export class BirdType { export const SPECIES = { bluebird: new BirdType("Eastern Bluebird", "Native to North American and very social, though can be timid around people.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#639bff", - [Sprite.BELLY]: "#f8b143", - [Sprite.UNDERBELLY]: "#ec8637", - [Sprite.WING]: "#578ae6", - [Sprite.WING_EDGE]: "#326ed9", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#639bff", + [SPRITE.BELLY]: "#f8b143", + [SPRITE.UNDERBELLY]: "#ec8637", + [SPRITE.WING]: "#578ae6", + [SPRITE.WING_EDGE]: "#326ed9", }), shimaEnaga: new BirdType("Shima Enaga", "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#ffffff", - [Sprite.BELLY]: "#ebe9e8", - [Sprite.UNDERBELLY]: "#ebd9d0", - [Sprite.WING]: "#f3d3c1", - [Sprite.WING_EDGE]: "#2d2d2dff", - [Sprite.THEME_HIGHLIGHT]: "#d7ac93", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#ffffff", + [SPRITE.BELLY]: "#ebe9e8", + [SPRITE.UNDERBELLY]: "#ebd9d0", + [SPRITE.WING]: "#f3d3c1", + [SPRITE.WING_EDGE]: "#2d2d2dff", + [SPRITE.THEME_HIGHLIGHT]: "#d7ac93", }), tuftedTitmouse: new BirdType("Tufted Titmouse", "Native to the eastern United States, full of personality, and notably my wife's favorite bird.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#c7cad7", - [Sprite.BELLY]: "#e4e5eb", - [Sprite.UNDERBELLY]: "#d7cfcb", - [Sprite.WING]: "#b1b5c5", - [Sprite.WING_EDGE]: "#9d9fa9", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#c7cad7", + [SPRITE.BELLY]: "#e4e5eb", + [SPRITE.UNDERBELLY]: "#d7cfcb", + [SPRITE.WING]: "#b1b5c5", + [SPRITE.WING_EDGE]: "#9d9fa9", }, ["tuft"]), europeanRobin: new BirdType("European Robin", "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#ffaf34", - [Sprite.HOOD]: "#aaa094", - [Sprite.BELLY]: "#ffaf34", - [Sprite.UNDERBELLY]: "#babec2", - [Sprite.WING]: "#aaa094", - [Sprite.WING_EDGE]: "#888580", - [Sprite.THEME_HIGHLIGHT]: "#ffaf34", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#ffaf34", + [SPRITE.HOOD]: "#aaa094", + [SPRITE.BELLY]: "#ffaf34", + [SPRITE.UNDERBELLY]: "#babec2", + [SPRITE.WING]: "#aaa094", + [SPRITE.WING_EDGE]: "#888580", + [SPRITE.THEME_HIGHLIGHT]: "#ffaf34", }), redCardinal: new BirdType("Red Cardinal", "Native to the eastern United States, this strikingly red bird is hard to miss.", { - [Sprite.BEAK]: "#d93619", - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#31353d", - [Sprite.HOOD]: "#e83a1b", - [Sprite.BELLY]: "#e83a1b", - [Sprite.UNDERBELLY]: "#dc3719", - [Sprite.WING]: "#d23215", - [Sprite.WING_EDGE]: "#b1321c", + [SPRITE.BEAK]: "#d93619", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#31353d", + [SPRITE.HOOD]: "#e83a1b", + [SPRITE.BELLY]: "#e83a1b", + [SPRITE.UNDERBELLY]: "#dc3719", + [SPRITE.WING]: "#d23215", + [SPRITE.WING_EDGE]: "#b1321c", }, ["tuft"]), americanGoldfinch: new BirdType("American Goldfinch", "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.", { - [Sprite.BEAK]: "#ffaf34", - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#fff255", - [Sprite.NOSE]: "#383838", - [Sprite.HOOD]: "#383838", - [Sprite.BELLY]: "#fff255", - [Sprite.UNDERBELLY]: "#f5ea63", - [Sprite.WING]: "#e8e079", - [Sprite.WING_EDGE]: "#191919", - [Sprite.THEME_HIGHLIGHT]: "#ffcc00" + [SPRITE.BEAK]: "#ffaf34", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#fff255", + [SPRITE.NOSE]: "#383838", + [SPRITE.HOOD]: "#383838", + [SPRITE.BELLY]: "#fff255", + [SPRITE.UNDERBELLY]: "#f5ea63", + [SPRITE.WING]: "#e8e079", + [SPRITE.WING_EDGE]: "#191919", + [SPRITE.THEME_HIGHLIGHT]: "#ffcc00" }), barnSwallow: new BirdType("Barn Swallow", "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#db7c4d", - [Sprite.BELLY]: "#f7e1c9", - [Sprite.UNDERBELLY]: "#ebc9a3", - [Sprite.WING]: "#2252a9", - [Sprite.WING_EDGE]: "#1c448b", - [Sprite.HOOD]: "#2252a9", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#db7c4d", + [SPRITE.BELLY]: "#f7e1c9", + [SPRITE.UNDERBELLY]: "#ebc9a3", + [SPRITE.WING]: "#2252a9", + [SPRITE.WING_EDGE]: "#1c448b", + [SPRITE.HOOD]: "#2252a9", }), mistletoebird: new BirdType("Mistletoebird", "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.", { - [Sprite.FOOT]: "#6c6a7c", - [Sprite.FACE]: "#352e6d", - [Sprite.BELLY]: "#fd6833", - [Sprite.UNDERBELLY]: "#e6e1d8", - [Sprite.WING]: "#342b7c", - [Sprite.WING_EDGE]: "#282065", + [SPRITE.FOOT]: "#6c6a7c", + [SPRITE.FACE]: "#352e6d", + [SPRITE.BELLY]: "#fd6833", + [SPRITE.UNDERBELLY]: "#e6e1d8", + [SPRITE.WING]: "#342b7c", + [SPRITE.WING_EDGE]: "#282065", }), redAvadavat: new BirdType("Red Avadavat", "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.", { - [Sprite.BEAK]: "#f71919", - [Sprite.FOOT]: "#af7575", - [Sprite.FACE]: "#cb092b", - [Sprite.BELLY]: "#ae1724", - [Sprite.UNDERBELLY]: "#831b24", - [Sprite.WING]: "#7e3030", - [Sprite.WING_EDGE]: "#490f0f", + [SPRITE.BEAK]: "#f71919", + [SPRITE.FOOT]: "#af7575", + [SPRITE.FACE]: "#cb092b", + [SPRITE.BELLY]: "#ae1724", + [SPRITE.UNDERBELLY]: "#831b24", + [SPRITE.WING]: "#7e3030", + [SPRITE.WING_EDGE]: "#490f0f", }), scarletRobin: new BirdType("Scarlet Robin", "Native to Australia, this striking robin can be found in Eucalyptus forests.", { - [Sprite.FOOT]: "#494949", - [Sprite.FACE]: "#3d3d3d", - [Sprite.BELLY]: "#fc5633", - [Sprite.UNDERBELLY]: "#dcdcdc", - [Sprite.WING]: "#2b2b2b", - [Sprite.WING_EDGE]: "#ebebeb", - [Sprite.THEME_HIGHLIGHT]: "#fc5633", + [SPRITE.FOOT]: "#494949", + [SPRITE.FACE]: "#3d3d3d", + [SPRITE.BELLY]: "#fc5633", + [SPRITE.UNDERBELLY]: "#dcdcdc", + [SPRITE.WING]: "#2b2b2b", + [SPRITE.WING_EDGE]: "#ebebeb", + [SPRITE.THEME_HIGHLIGHT]: "#fc5633", }), americanRobin: new BirdType("American Robin", "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.", { - [Sprite.BEAK]: "#e89f30", - [Sprite.FOOT]: "#9f8075", - [Sprite.FACE]: "#2d2d2d", - [Sprite.BELLY]: "#eb7a3a", - [Sprite.UNDERBELLY]: "#eb7a3a", - [Sprite.WING]: "#444444", - [Sprite.WING_EDGE]: "#232323", - [Sprite.THEME_HIGHLIGHT]: "#eb7a3a", + [SPRITE.BEAK]: "#e89f30", + [SPRITE.FOOT]: "#9f8075", + [SPRITE.FACE]: "#2d2d2d", + [SPRITE.BELLY]: "#eb7a3a", + [SPRITE.UNDERBELLY]: "#eb7a3a", + [SPRITE.WING]: "#444444", + [SPRITE.WING_EDGE]: "#232323", + [SPRITE.THEME_HIGHLIGHT]: "#eb7a3a", }), carolinaWren: new BirdType("Carolina Wren", "Native to the eastern United States, these little birds are known for their curious and energetic nature.", { - [Sprite.FOOT]: "#af8e75", - [Sprite.FACE]: "#edc7a9", - [Sprite.NOSE]: "#f7eee5", - [Sprite.HOOD]: "#c58a5b", - [Sprite.BELLY]: "#e1b796", - [Sprite.UNDERBELLY]: "#c79e7c", - [Sprite.WING]: "#c58a5b", - [Sprite.WING_EDGE]: "#866348", + [SPRITE.FOOT]: "#af8e75", + [SPRITE.FACE]: "#edc7a9", + [SPRITE.NOSE]: "#f7eee5", + [SPRITE.HOOD]: "#c58a5b", + [SPRITE.BELLY]: "#e1b796", + [SPRITE.UNDERBELLY]: "#c79e7c", + [SPRITE.WING]: "#c58a5b", + [SPRITE.WING_EDGE]: "#866348", }), }; \ No newline at end of file