Add latin names to the birds

This commit is contained in:
Idrees Hassan
2026-03-28 11:48:02 -07:00
parent ebb9f92be2
commit 74a776cd4f
10 changed files with 408 additions and 30 deletions

BIN
dist/extension.zip vendored

Binary file not shown.

View File

@@ -237,6 +237,8 @@
"bluebird": { "bluebird": {
"name": "Eastern Bluebird", "name": "Eastern Bluebird",
"description": "Native to North American and very social, though can be timid around people.", "description": "Native to North American and very social, though can be timid around people.",
"latinName": "Sialia sialis",
"url": "https://en.wikipedia.org/wiki/Eastern_bluebird",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#639bff", "face": "#639bff",
@@ -249,6 +251,8 @@
"shimaEnaga": { "shimaEnaga": {
"name": "Shima Enaga", "name": "Shima Enaga",
"description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.", "description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.",
"latinName": "Aegithalos caudatus",
"url": "https://en.wikipedia.org/wiki/Long-tailed_tit",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffffff", "face": "#ffffff",
@@ -262,6 +266,8 @@
"tuftedTitmouse": { "tuftedTitmouse": {
"name": "Tufted Titmouse", "name": "Tufted Titmouse",
"description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.", "description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.",
"latinName": "Baeolophus bicolor",
"url": "https://en.wikipedia.org/wiki/Tufted_titmouse",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#c7cad7", "face": "#c7cad7",
@@ -278,6 +284,8 @@
"europeanRobin": { "europeanRobin": {
"name": "European Robin", "name": "European Robin",
"description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.", "description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.",
"latinName": "Erithacus rubecula",
"url": "https://en.wikipedia.org/wiki/European_robin",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffaf34", "face": "#ffaf34",
@@ -292,6 +300,8 @@
"redCardinal": { "redCardinal": {
"name": "Red Cardinal", "name": "Red Cardinal",
"description": "Native to the eastern United States, this strikingly red bird is hard to miss.", "description": "Native to the eastern United States, this strikingly red bird is hard to miss.",
"latinName": "Cardinalis cardinalis",
"url": "https://en.wikipedia.org/wiki/Red_cardinal",
"colors": { "colors": {
"beak": "#d93619", "beak": "#d93619",
"foot": "#af8e75", "foot": "#af8e75",
@@ -311,6 +321,8 @@
"americanGoldfinch": { "americanGoldfinch": {
"name": "American Goldfinch", "name": "American Goldfinch",
"description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.", "description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.",
"latinName": "Spinus tristis",
"url": "https://en.wikipedia.org/wiki/American_goldfinch",
"colors": { "colors": {
"beak": "#ffaf34", "beak": "#ffaf34",
"foot": "#af8e75", "foot": "#af8e75",
@@ -327,6 +339,8 @@
"barnSwallow": { "barnSwallow": {
"name": "Barn Swallow", "name": "Barn Swallow",
"description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", "description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.",
"latinName": "Hirundo rustica",
"url": "https://en.wikipedia.org/wiki/Barn_swallow",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#db7c4d", "face": "#db7c4d",
@@ -340,6 +354,8 @@
"mistletoebird": { "mistletoebird": {
"name": "Mistletoebird", "name": "Mistletoebird",
"description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.", "description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.",
"latinName": "Dicaeum hirundinaceum",
"url": "https://en.wikipedia.org/wiki/Mistletoebird",
"colors": { "colors": {
"foot": "#6c6a7c", "foot": "#6c6a7c",
"face": "#352e6d", "face": "#352e6d",
@@ -352,6 +368,8 @@
"scarletRobin": { "scarletRobin": {
"name": "Scarlet Robin", "name": "Scarlet Robin",
"description": "Native to Australia, this striking robin can be found in Eucalyptus forests.", "description": "Native to Australia, this striking robin can be found in Eucalyptus forests.",
"latinName": "Petroica boodang",
"url": "https://en.wikipedia.org/wiki/Scarlet_robin",
"colors": { "colors": {
"foot": "#494949", "foot": "#494949",
"face": "#3d3d3d", "face": "#3d3d3d",
@@ -366,6 +384,8 @@
"americanRobin": { "americanRobin": {
"name": "American Robin", "name": "American Robin",
"description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.", "description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.",
"latinName": "Turdus migratorius",
"url": "https://en.wikipedia.org/wiki/American_robin",
"colors": { "colors": {
"beak": "#e89f30", "beak": "#e89f30",
"foot": "#9f8075", "foot": "#9f8075",
@@ -380,6 +400,8 @@
"carolinaWren": { "carolinaWren": {
"name": "Carolina Wren", "name": "Carolina Wren",
"description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.", "description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.",
"latinName": "Thryothorus ludovicianus",
"url": "https://en.wikipedia.org/wiki/Carolina_wren",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#edc7a9", "face": "#edc7a9",
@@ -394,6 +416,8 @@
"blackCappedChickadee": { "blackCappedChickadee": {
"name": "Black-capped Chickadee", "name": "Black-capped Chickadee",
"description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.", "description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.",
"latinName": "Poecile atricapillus",
"url": "https://en.wikipedia.org/wiki/Black-capped_chickadee",
"colors": { "colors": {
"hood": "#363636", "hood": "#363636",
"cheek": "#363636", "cheek": "#363636",
@@ -413,6 +437,8 @@
"blueJay": { "blueJay": {
"name": "Blue Jay", "name": "Blue Jay",
"description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.", "description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.",
"latinName": "Cyanocitta cristata",
"url": "https://en.wikipedia.org/wiki/Blue_jay",
"colors": { "colors": {
"foot": "#5a626b", "foot": "#5a626b",
"face": "#ebf2ff", "face": "#ebf2ff",
@@ -432,6 +458,8 @@
"darkEyedJunco": { "darkEyedJunco": {
"name": "Dark-eyed Junco", "name": "Dark-eyed Junco",
"description": "Native across North America, these social birds will often be seen hopping along the ground in winter.", "description": "Native across North America, these social birds will often be seen hopping along the ground in winter.",
"latinName": "Junco hyemalis",
"url": "https://en.wikipedia.org/wiki/Dark-eyed_junco",
"colors": { "colors": {
"face": "#55565e", "face": "#55565e",
"wing": "#5c5f69", "wing": "#5c5f69",
@@ -445,6 +473,8 @@
"houseFinch": { "houseFinch": {
"name": "House Finch", "name": "House Finch",
"description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.", "description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.",
"latinName": "Haemorhous mexicanus",
"url": "https://en.wikipedia.org/wiki/House_finch",
"colors": { "colors": {
"face": "#cc3a3f", "face": "#cc3a3f",
"wing": "#ae8e78", "wing": "#ae8e78",
@@ -461,6 +491,8 @@
"pigeon": { "pigeon": {
"name": "Pigeon", "name": "Pigeon",
"description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.", "description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.",
"latinName": "Columba livia",
"url": "https://en.wikipedia.org/wiki/Rock_dove",
"colors": { "colors": {
"foot": "#ef6e5b", "foot": "#ef6e5b",
"face": "#5a6c91", "face": "#5a6c91",
@@ -474,6 +506,8 @@
"redAvadavat": { "redAvadavat": {
"name": "Red Avadavat", "name": "Red Avadavat",
"description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.", "description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.",
"latinName": "Amandava amandava",
"url": "https://en.wikipedia.org/wiki/Red_avadavat",
"colors": { "colors": {
"beak": "#f71919", "beak": "#f71919",
"foot": "#af7575", "foot": "#af7575",
@@ -489,6 +523,8 @@
"pinkRobin": { "pinkRobin": {
"name": "Pink Robin", "name": "Pink Robin",
"description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.", "description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.",
"latinName": "Petroica rodinogaster",
"url": "https://en.wikipedia.org/wiki/Pink_robin",
"colors": { "colors": {
"face": "#403a46", "face": "#403a46",
"wing": "#38333d", "wing": "#38333d",
@@ -503,6 +539,8 @@
"redWarbler": { "redWarbler": {
"name": "Red Warbler", "name": "Red Warbler",
"description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.", "description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.",
"latinName": "Cardellina rubra",
"url": "https://en.wikipedia.org/wiki/Red_warbler",
"colors": { "colors": {
"face": "#e80a28", "face": "#e80a28",
"belly": "#d90921", "belly": "#d90921",
@@ -522,6 +560,8 @@
"elegantEuphonia": { "elegantEuphonia": {
"name": "Elegant Euphonia", "name": "Elegant Euphonia",
"description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.", "description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.",
"latinName": "Chlorophonia elegantissima",
"url": "https://en.wikipedia.org/wiki/Elegant_euphonia",
"colors": { "colors": {
"wing": "#101480", "wing": "#101480",
"wing-edge": "#070956", "wing-edge": "#070956",
@@ -649,13 +689,17 @@
/** /**
* @param {string} name * @param {string} name
* @param {string} description * @param {string} description
* @param {string} latinName
* @param {string} url
* @param {Record<string, string>} colors * @param {Record<string, string>} colors
* @param {string[]} [tags] * @param {string[]} [tags]
* @param {Rarity} [rarity] * @param {Rarity} [rarity]
*/ */
constructor(name, description, colors, tags = [], rarity = RARITY.FAMILIAR) { constructor(name, description, latinName, url, colors, tags = [], rarity = RARITY.FAMILIAR) {
this.name = name; this.name = name;
this.description = description; this.description = description;
this.latinName = latinName;
this.url = url;
const defaultColors = { const defaultColors = {
[PALETTE.TRANSPARENT]: "transparent", [PALETTE.TRANSPARENT]: "transparent",
[PALETTE.OUTLINE]: "#000000", [PALETTE.OUTLINE]: "#000000",
@@ -749,7 +793,7 @@
const SPECIES = Object.fromEntries( const SPECIES = Object.fromEntries(
Object.entries(species).map(([id, data]) => [ Object.entries(species).map(([id, data]) => [
id, id,
new BirdType(data.name, data.description, data.colors, data.tags, data.rarity) new BirdType(data.name, data.description, data.latinName, data.url, data.colors, data.tags, data.rarity)
]), ]),
); );
@@ -2329,6 +2373,13 @@
color: #7c6c4b; color: #7c6c4b;
} }
.birb-field-guide-latin-name {
text-decoration: underline;
font-style: italic;
font-weight: bold;
color: inherit;
}
#birb-feather { #birb-feather {
cursor: pointer; cursor: pointer;
} }
@@ -3097,14 +3148,26 @@
const boldName = document.createElement("b"); const boldName = document.createElement("b");
boldName.textContent = type.name; boldName.textContent = type.name;
const spacer = document.createElement("div");
spacer.style.height = "0.3em"; const spacerOne = document.createElement("div");
spacerOne.style.height = "0.3em";
const latinName = document.createElement("a");
latinName.className = "birb-field-guide-latin-name";
latinName.textContent = type.latinName;
latinName.href = type.url;
latinName.target = "_blank";
const spacerTwo = document.createElement("div");
spacerTwo.style.height = "0.3em";
const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description); const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description);
const fragment = document.createDocumentFragment(); const fragment = document.createDocumentFragment();
fragment.appendChild(boldName); fragment.appendChild(boldName);
fragment.appendChild(spacer); fragment.appendChild(spacerOne);
fragment.appendChild(latinName);
fragment.appendChild(spacerTwo);
fragment.appendChild(descText); fragment.appendChild(descText);
return fragment; return fragment;

73
dist/obsidian/main.js vendored
View File

@@ -242,6 +242,8 @@ module.exports = class PocketBird extends Plugin {
"bluebird": { "bluebird": {
"name": "Eastern Bluebird", "name": "Eastern Bluebird",
"description": "Native to North American and very social, though can be timid around people.", "description": "Native to North American and very social, though can be timid around people.",
"latinName": "Sialia sialis",
"url": "https://en.wikipedia.org/wiki/Eastern_bluebird",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#639bff", "face": "#639bff",
@@ -254,6 +256,8 @@ module.exports = class PocketBird extends Plugin {
"shimaEnaga": { "shimaEnaga": {
"name": "Shima Enaga", "name": "Shima Enaga",
"description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.", "description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.",
"latinName": "Aegithalos caudatus",
"url": "https://en.wikipedia.org/wiki/Long-tailed_tit",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffffff", "face": "#ffffff",
@@ -267,6 +271,8 @@ module.exports = class PocketBird extends Plugin {
"tuftedTitmouse": { "tuftedTitmouse": {
"name": "Tufted Titmouse", "name": "Tufted Titmouse",
"description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.", "description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.",
"latinName": "Baeolophus bicolor",
"url": "https://en.wikipedia.org/wiki/Tufted_titmouse",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#c7cad7", "face": "#c7cad7",
@@ -283,6 +289,8 @@ module.exports = class PocketBird extends Plugin {
"europeanRobin": { "europeanRobin": {
"name": "European Robin", "name": "European Robin",
"description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.", "description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.",
"latinName": "Erithacus rubecula",
"url": "https://en.wikipedia.org/wiki/European_robin",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffaf34", "face": "#ffaf34",
@@ -297,6 +305,8 @@ module.exports = class PocketBird extends Plugin {
"redCardinal": { "redCardinal": {
"name": "Red Cardinal", "name": "Red Cardinal",
"description": "Native to the eastern United States, this strikingly red bird is hard to miss.", "description": "Native to the eastern United States, this strikingly red bird is hard to miss.",
"latinName": "Cardinalis cardinalis",
"url": "https://en.wikipedia.org/wiki/Red_cardinal",
"colors": { "colors": {
"beak": "#d93619", "beak": "#d93619",
"foot": "#af8e75", "foot": "#af8e75",
@@ -316,6 +326,8 @@ module.exports = class PocketBird extends Plugin {
"americanGoldfinch": { "americanGoldfinch": {
"name": "American Goldfinch", "name": "American Goldfinch",
"description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.", "description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.",
"latinName": "Spinus tristis",
"url": "https://en.wikipedia.org/wiki/American_goldfinch",
"colors": { "colors": {
"beak": "#ffaf34", "beak": "#ffaf34",
"foot": "#af8e75", "foot": "#af8e75",
@@ -332,6 +344,8 @@ module.exports = class PocketBird extends Plugin {
"barnSwallow": { "barnSwallow": {
"name": "Barn Swallow", "name": "Barn Swallow",
"description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", "description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.",
"latinName": "Hirundo rustica",
"url": "https://en.wikipedia.org/wiki/Barn_swallow",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#db7c4d", "face": "#db7c4d",
@@ -345,6 +359,8 @@ module.exports = class PocketBird extends Plugin {
"mistletoebird": { "mistletoebird": {
"name": "Mistletoebird", "name": "Mistletoebird",
"description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.", "description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.",
"latinName": "Dicaeum hirundinaceum",
"url": "https://en.wikipedia.org/wiki/Mistletoebird",
"colors": { "colors": {
"foot": "#6c6a7c", "foot": "#6c6a7c",
"face": "#352e6d", "face": "#352e6d",
@@ -357,6 +373,8 @@ module.exports = class PocketBird extends Plugin {
"scarletRobin": { "scarletRobin": {
"name": "Scarlet Robin", "name": "Scarlet Robin",
"description": "Native to Australia, this striking robin can be found in Eucalyptus forests.", "description": "Native to Australia, this striking robin can be found in Eucalyptus forests.",
"latinName": "Petroica boodang",
"url": "https://en.wikipedia.org/wiki/Scarlet_robin",
"colors": { "colors": {
"foot": "#494949", "foot": "#494949",
"face": "#3d3d3d", "face": "#3d3d3d",
@@ -371,6 +389,8 @@ module.exports = class PocketBird extends Plugin {
"americanRobin": { "americanRobin": {
"name": "American Robin", "name": "American Robin",
"description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.", "description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.",
"latinName": "Turdus migratorius",
"url": "https://en.wikipedia.org/wiki/American_robin",
"colors": { "colors": {
"beak": "#e89f30", "beak": "#e89f30",
"foot": "#9f8075", "foot": "#9f8075",
@@ -385,6 +405,8 @@ module.exports = class PocketBird extends Plugin {
"carolinaWren": { "carolinaWren": {
"name": "Carolina Wren", "name": "Carolina Wren",
"description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.", "description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.",
"latinName": "Thryothorus ludovicianus",
"url": "https://en.wikipedia.org/wiki/Carolina_wren",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#edc7a9", "face": "#edc7a9",
@@ -399,6 +421,8 @@ module.exports = class PocketBird extends Plugin {
"blackCappedChickadee": { "blackCappedChickadee": {
"name": "Black-capped Chickadee", "name": "Black-capped Chickadee",
"description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.", "description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.",
"latinName": "Poecile atricapillus",
"url": "https://en.wikipedia.org/wiki/Black-capped_chickadee",
"colors": { "colors": {
"hood": "#363636", "hood": "#363636",
"cheek": "#363636", "cheek": "#363636",
@@ -418,6 +442,8 @@ module.exports = class PocketBird extends Plugin {
"blueJay": { "blueJay": {
"name": "Blue Jay", "name": "Blue Jay",
"description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.", "description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.",
"latinName": "Cyanocitta cristata",
"url": "https://en.wikipedia.org/wiki/Blue_jay",
"colors": { "colors": {
"foot": "#5a626b", "foot": "#5a626b",
"face": "#ebf2ff", "face": "#ebf2ff",
@@ -437,6 +463,8 @@ module.exports = class PocketBird extends Plugin {
"darkEyedJunco": { "darkEyedJunco": {
"name": "Dark-eyed Junco", "name": "Dark-eyed Junco",
"description": "Native across North America, these social birds will often be seen hopping along the ground in winter.", "description": "Native across North America, these social birds will often be seen hopping along the ground in winter.",
"latinName": "Junco hyemalis",
"url": "https://en.wikipedia.org/wiki/Dark-eyed_junco",
"colors": { "colors": {
"face": "#55565e", "face": "#55565e",
"wing": "#5c5f69", "wing": "#5c5f69",
@@ -450,6 +478,8 @@ module.exports = class PocketBird extends Plugin {
"houseFinch": { "houseFinch": {
"name": "House Finch", "name": "House Finch",
"description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.", "description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.",
"latinName": "Haemorhous mexicanus",
"url": "https://en.wikipedia.org/wiki/House_finch",
"colors": { "colors": {
"face": "#cc3a3f", "face": "#cc3a3f",
"wing": "#ae8e78", "wing": "#ae8e78",
@@ -466,6 +496,8 @@ module.exports = class PocketBird extends Plugin {
"pigeon": { "pigeon": {
"name": "Pigeon", "name": "Pigeon",
"description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.", "description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.",
"latinName": "Columba livia",
"url": "https://en.wikipedia.org/wiki/Rock_dove",
"colors": { "colors": {
"foot": "#ef6e5b", "foot": "#ef6e5b",
"face": "#5a6c91", "face": "#5a6c91",
@@ -479,6 +511,8 @@ module.exports = class PocketBird extends Plugin {
"redAvadavat": { "redAvadavat": {
"name": "Red Avadavat", "name": "Red Avadavat",
"description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.", "description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.",
"latinName": "Amandava amandava",
"url": "https://en.wikipedia.org/wiki/Red_avadavat",
"colors": { "colors": {
"beak": "#f71919", "beak": "#f71919",
"foot": "#af7575", "foot": "#af7575",
@@ -494,6 +528,8 @@ module.exports = class PocketBird extends Plugin {
"pinkRobin": { "pinkRobin": {
"name": "Pink Robin", "name": "Pink Robin",
"description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.", "description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.",
"latinName": "Petroica rodinogaster",
"url": "https://en.wikipedia.org/wiki/Pink_robin",
"colors": { "colors": {
"face": "#403a46", "face": "#403a46",
"wing": "#38333d", "wing": "#38333d",
@@ -508,6 +544,8 @@ module.exports = class PocketBird extends Plugin {
"redWarbler": { "redWarbler": {
"name": "Red Warbler", "name": "Red Warbler",
"description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.", "description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.",
"latinName": "Cardellina rubra",
"url": "https://en.wikipedia.org/wiki/Red_warbler",
"colors": { "colors": {
"face": "#e80a28", "face": "#e80a28",
"belly": "#d90921", "belly": "#d90921",
@@ -527,6 +565,8 @@ module.exports = class PocketBird extends Plugin {
"elegantEuphonia": { "elegantEuphonia": {
"name": "Elegant Euphonia", "name": "Elegant Euphonia",
"description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.", "description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.",
"latinName": "Chlorophonia elegantissima",
"url": "https://en.wikipedia.org/wiki/Elegant_euphonia",
"colors": { "colors": {
"wing": "#101480", "wing": "#101480",
"wing-edge": "#070956", "wing-edge": "#070956",
@@ -654,13 +694,17 @@ module.exports = class PocketBird extends Plugin {
/** /**
* @param {string} name * @param {string} name
* @param {string} description * @param {string} description
* @param {string} latinName
* @param {string} url
* @param {Record<string, string>} colors * @param {Record<string, string>} colors
* @param {string[]} [tags] * @param {string[]} [tags]
* @param {Rarity} [rarity] * @param {Rarity} [rarity]
*/ */
constructor(name, description, colors, tags = [], rarity = RARITY.FAMILIAR) { constructor(name, description, latinName, url, colors, tags = [], rarity = RARITY.FAMILIAR) {
this.name = name; this.name = name;
this.description = description; this.description = description;
this.latinName = latinName;
this.url = url;
const defaultColors = { const defaultColors = {
[PALETTE.TRANSPARENT]: "transparent", [PALETTE.TRANSPARENT]: "transparent",
[PALETTE.OUTLINE]: "#000000", [PALETTE.OUTLINE]: "#000000",
@@ -754,7 +798,7 @@ module.exports = class PocketBird extends Plugin {
const SPECIES = Object.fromEntries( const SPECIES = Object.fromEntries(
Object.entries(species).map(([id, data]) => [ Object.entries(species).map(([id, data]) => [
id, id,
new BirdType(data.name, data.description, data.colors, data.tags, data.rarity) new BirdType(data.name, data.description, data.latinName, data.url, data.colors, data.tags, data.rarity)
]), ]),
); );
@@ -2362,6 +2406,13 @@ module.exports = class PocketBird extends Plugin {
color: #7c6c4b; color: #7c6c4b;
} }
.birb-field-guide-latin-name {
text-decoration: underline;
font-style: italic;
font-weight: bold;
color: inherit;
}
#birb-feather { #birb-feather {
cursor: pointer; cursor: pointer;
} }
@@ -3130,14 +3181,26 @@ module.exports = class PocketBird extends Plugin {
const boldName = document.createElement("b"); const boldName = document.createElement("b");
boldName.textContent = type.name; boldName.textContent = type.name;
const spacer = document.createElement("div");
spacer.style.height = "0.3em"; const spacerOne = document.createElement("div");
spacerOne.style.height = "0.3em";
const latinName = document.createElement("a");
latinName.className = "birb-field-guide-latin-name";
latinName.textContent = type.latinName;
latinName.href = type.url;
latinName.target = "_blank";
const spacerTwo = document.createElement("div");
spacerTwo.style.height = "0.3em";
const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description); const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description);
const fragment = document.createDocumentFragment(); const fragment = document.createDocumentFragment();
fragment.appendChild(boldName); fragment.appendChild(boldName);
fragment.appendChild(spacer); fragment.appendChild(spacerOne);
fragment.appendChild(latinName);
fragment.appendChild(spacerTwo);
fragment.appendChild(descText); fragment.appendChild(descText);
return fragment; return fragment;

View File

@@ -251,6 +251,8 @@
"bluebird": { "bluebird": {
"name": "Eastern Bluebird", "name": "Eastern Bluebird",
"description": "Native to North American and very social, though can be timid around people.", "description": "Native to North American and very social, though can be timid around people.",
"latinName": "Sialia sialis",
"url": "https://en.wikipedia.org/wiki/Eastern_bluebird",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#639bff", "face": "#639bff",
@@ -263,6 +265,8 @@
"shimaEnaga": { "shimaEnaga": {
"name": "Shima Enaga", "name": "Shima Enaga",
"description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.", "description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.",
"latinName": "Aegithalos caudatus",
"url": "https://en.wikipedia.org/wiki/Long-tailed_tit",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffffff", "face": "#ffffff",
@@ -276,6 +280,8 @@
"tuftedTitmouse": { "tuftedTitmouse": {
"name": "Tufted Titmouse", "name": "Tufted Titmouse",
"description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.", "description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.",
"latinName": "Baeolophus bicolor",
"url": "https://en.wikipedia.org/wiki/Tufted_titmouse",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#c7cad7", "face": "#c7cad7",
@@ -292,6 +298,8 @@
"europeanRobin": { "europeanRobin": {
"name": "European Robin", "name": "European Robin",
"description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.", "description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.",
"latinName": "Erithacus rubecula",
"url": "https://en.wikipedia.org/wiki/European_robin",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffaf34", "face": "#ffaf34",
@@ -306,6 +314,8 @@
"redCardinal": { "redCardinal": {
"name": "Red Cardinal", "name": "Red Cardinal",
"description": "Native to the eastern United States, this strikingly red bird is hard to miss.", "description": "Native to the eastern United States, this strikingly red bird is hard to miss.",
"latinName": "Cardinalis cardinalis",
"url": "https://en.wikipedia.org/wiki/Red_cardinal",
"colors": { "colors": {
"beak": "#d93619", "beak": "#d93619",
"foot": "#af8e75", "foot": "#af8e75",
@@ -325,6 +335,8 @@
"americanGoldfinch": { "americanGoldfinch": {
"name": "American Goldfinch", "name": "American Goldfinch",
"description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.", "description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.",
"latinName": "Spinus tristis",
"url": "https://en.wikipedia.org/wiki/American_goldfinch",
"colors": { "colors": {
"beak": "#ffaf34", "beak": "#ffaf34",
"foot": "#af8e75", "foot": "#af8e75",
@@ -341,6 +353,8 @@
"barnSwallow": { "barnSwallow": {
"name": "Barn Swallow", "name": "Barn Swallow",
"description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", "description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.",
"latinName": "Hirundo rustica",
"url": "https://en.wikipedia.org/wiki/Barn_swallow",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#db7c4d", "face": "#db7c4d",
@@ -354,6 +368,8 @@
"mistletoebird": { "mistletoebird": {
"name": "Mistletoebird", "name": "Mistletoebird",
"description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.", "description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.",
"latinName": "Dicaeum hirundinaceum",
"url": "https://en.wikipedia.org/wiki/Mistletoebird",
"colors": { "colors": {
"foot": "#6c6a7c", "foot": "#6c6a7c",
"face": "#352e6d", "face": "#352e6d",
@@ -366,6 +382,8 @@
"scarletRobin": { "scarletRobin": {
"name": "Scarlet Robin", "name": "Scarlet Robin",
"description": "Native to Australia, this striking robin can be found in Eucalyptus forests.", "description": "Native to Australia, this striking robin can be found in Eucalyptus forests.",
"latinName": "Petroica boodang",
"url": "https://en.wikipedia.org/wiki/Scarlet_robin",
"colors": { "colors": {
"foot": "#494949", "foot": "#494949",
"face": "#3d3d3d", "face": "#3d3d3d",
@@ -380,6 +398,8 @@
"americanRobin": { "americanRobin": {
"name": "American Robin", "name": "American Robin",
"description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.", "description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.",
"latinName": "Turdus migratorius",
"url": "https://en.wikipedia.org/wiki/American_robin",
"colors": { "colors": {
"beak": "#e89f30", "beak": "#e89f30",
"foot": "#9f8075", "foot": "#9f8075",
@@ -394,6 +414,8 @@
"carolinaWren": { "carolinaWren": {
"name": "Carolina Wren", "name": "Carolina Wren",
"description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.", "description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.",
"latinName": "Thryothorus ludovicianus",
"url": "https://en.wikipedia.org/wiki/Carolina_wren",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#edc7a9", "face": "#edc7a9",
@@ -408,6 +430,8 @@
"blackCappedChickadee": { "blackCappedChickadee": {
"name": "Black-capped Chickadee", "name": "Black-capped Chickadee",
"description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.", "description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.",
"latinName": "Poecile atricapillus",
"url": "https://en.wikipedia.org/wiki/Black-capped_chickadee",
"colors": { "colors": {
"hood": "#363636", "hood": "#363636",
"cheek": "#363636", "cheek": "#363636",
@@ -427,6 +451,8 @@
"blueJay": { "blueJay": {
"name": "Blue Jay", "name": "Blue Jay",
"description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.", "description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.",
"latinName": "Cyanocitta cristata",
"url": "https://en.wikipedia.org/wiki/Blue_jay",
"colors": { "colors": {
"foot": "#5a626b", "foot": "#5a626b",
"face": "#ebf2ff", "face": "#ebf2ff",
@@ -446,6 +472,8 @@
"darkEyedJunco": { "darkEyedJunco": {
"name": "Dark-eyed Junco", "name": "Dark-eyed Junco",
"description": "Native across North America, these social birds will often be seen hopping along the ground in winter.", "description": "Native across North America, these social birds will often be seen hopping along the ground in winter.",
"latinName": "Junco hyemalis",
"url": "https://en.wikipedia.org/wiki/Dark-eyed_junco",
"colors": { "colors": {
"face": "#55565e", "face": "#55565e",
"wing": "#5c5f69", "wing": "#5c5f69",
@@ -459,6 +487,8 @@
"houseFinch": { "houseFinch": {
"name": "House Finch", "name": "House Finch",
"description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.", "description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.",
"latinName": "Haemorhous mexicanus",
"url": "https://en.wikipedia.org/wiki/House_finch",
"colors": { "colors": {
"face": "#cc3a3f", "face": "#cc3a3f",
"wing": "#ae8e78", "wing": "#ae8e78",
@@ -475,6 +505,8 @@
"pigeon": { "pigeon": {
"name": "Pigeon", "name": "Pigeon",
"description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.", "description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.",
"latinName": "Columba livia",
"url": "https://en.wikipedia.org/wiki/Rock_dove",
"colors": { "colors": {
"foot": "#ef6e5b", "foot": "#ef6e5b",
"face": "#5a6c91", "face": "#5a6c91",
@@ -488,6 +520,8 @@
"redAvadavat": { "redAvadavat": {
"name": "Red Avadavat", "name": "Red Avadavat",
"description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.", "description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.",
"latinName": "Amandava amandava",
"url": "https://en.wikipedia.org/wiki/Red_avadavat",
"colors": { "colors": {
"beak": "#f71919", "beak": "#f71919",
"foot": "#af7575", "foot": "#af7575",
@@ -503,6 +537,8 @@
"pinkRobin": { "pinkRobin": {
"name": "Pink Robin", "name": "Pink Robin",
"description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.", "description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.",
"latinName": "Petroica rodinogaster",
"url": "https://en.wikipedia.org/wiki/Pink_robin",
"colors": { "colors": {
"face": "#403a46", "face": "#403a46",
"wing": "#38333d", "wing": "#38333d",
@@ -517,6 +553,8 @@
"redWarbler": { "redWarbler": {
"name": "Red Warbler", "name": "Red Warbler",
"description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.", "description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.",
"latinName": "Cardellina rubra",
"url": "https://en.wikipedia.org/wiki/Red_warbler",
"colors": { "colors": {
"face": "#e80a28", "face": "#e80a28",
"belly": "#d90921", "belly": "#d90921",
@@ -536,6 +574,8 @@
"elegantEuphonia": { "elegantEuphonia": {
"name": "Elegant Euphonia", "name": "Elegant Euphonia",
"description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.", "description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.",
"latinName": "Chlorophonia elegantissima",
"url": "https://en.wikipedia.org/wiki/Elegant_euphonia",
"colors": { "colors": {
"wing": "#101480", "wing": "#101480",
"wing-edge": "#070956", "wing-edge": "#070956",
@@ -663,13 +703,17 @@
/** /**
* @param {string} name * @param {string} name
* @param {string} description * @param {string} description
* @param {string} latinName
* @param {string} url
* @param {Record<string, string>} colors * @param {Record<string, string>} colors
* @param {string[]} [tags] * @param {string[]} [tags]
* @param {Rarity} [rarity] * @param {Rarity} [rarity]
*/ */
constructor(name, description, colors, tags = [], rarity = RARITY.FAMILIAR) { constructor(name, description, latinName, url, colors, tags = [], rarity = RARITY.FAMILIAR) {
this.name = name; this.name = name;
this.description = description; this.description = description;
this.latinName = latinName;
this.url = url;
const defaultColors = { const defaultColors = {
[PALETTE.TRANSPARENT]: "transparent", [PALETTE.TRANSPARENT]: "transparent",
[PALETTE.OUTLINE]: "#000000", [PALETTE.OUTLINE]: "#000000",
@@ -763,7 +807,7 @@
const SPECIES = Object.fromEntries( const SPECIES = Object.fromEntries(
Object.entries(species).map(([id, data]) => [ Object.entries(species).map(([id, data]) => [
id, id,
new BirdType(data.name, data.description, data.colors, data.tags, data.rarity) new BirdType(data.name, data.description, data.latinName, data.url, data.colors, data.tags, data.rarity)
]), ]),
); );
@@ -2324,6 +2368,13 @@
color: #7c6c4b; color: #7c6c4b;
} }
.birb-field-guide-latin-name {
text-decoration: underline;
font-style: italic;
font-weight: bold;
color: inherit;
}
#birb-feather { #birb-feather {
cursor: pointer; cursor: pointer;
} }
@@ -3092,14 +3143,26 @@
const boldName = document.createElement("b"); const boldName = document.createElement("b");
boldName.textContent = type.name; boldName.textContent = type.name;
const spacer = document.createElement("div");
spacer.style.height = "0.3em"; const spacerOne = document.createElement("div");
spacerOne.style.height = "0.3em";
const latinName = document.createElement("a");
latinName.className = "birb-field-guide-latin-name";
latinName.textContent = type.latinName;
latinName.href = type.url;
latinName.target = "_blank";
const spacerTwo = document.createElement("div");
spacerTwo.style.height = "0.3em";
const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description); const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description);
const fragment = document.createDocumentFragment(); const fragment = document.createDocumentFragment();
fragment.appendChild(boldName); fragment.appendChild(boldName);
fragment.appendChild(spacer); fragment.appendChild(spacerOne);
fragment.appendChild(latinName);
fragment.appendChild(spacerTwo);
fragment.appendChild(descText); fragment.appendChild(descText);
return fragment; return fragment;

View File

@@ -237,6 +237,8 @@
"bluebird": { "bluebird": {
"name": "Eastern Bluebird", "name": "Eastern Bluebird",
"description": "Native to North American and very social, though can be timid around people.", "description": "Native to North American and very social, though can be timid around people.",
"latinName": "Sialia sialis",
"url": "https://en.wikipedia.org/wiki/Eastern_bluebird",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#639bff", "face": "#639bff",
@@ -249,6 +251,8 @@
"shimaEnaga": { "shimaEnaga": {
"name": "Shima Enaga", "name": "Shima Enaga",
"description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.", "description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.",
"latinName": "Aegithalos caudatus",
"url": "https://en.wikipedia.org/wiki/Long-tailed_tit",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffffff", "face": "#ffffff",
@@ -262,6 +266,8 @@
"tuftedTitmouse": { "tuftedTitmouse": {
"name": "Tufted Titmouse", "name": "Tufted Titmouse",
"description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.", "description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.",
"latinName": "Baeolophus bicolor",
"url": "https://en.wikipedia.org/wiki/Tufted_titmouse",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#c7cad7", "face": "#c7cad7",
@@ -278,6 +284,8 @@
"europeanRobin": { "europeanRobin": {
"name": "European Robin", "name": "European Robin",
"description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.", "description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.",
"latinName": "Erithacus rubecula",
"url": "https://en.wikipedia.org/wiki/European_robin",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffaf34", "face": "#ffaf34",
@@ -292,6 +300,8 @@
"redCardinal": { "redCardinal": {
"name": "Red Cardinal", "name": "Red Cardinal",
"description": "Native to the eastern United States, this strikingly red bird is hard to miss.", "description": "Native to the eastern United States, this strikingly red bird is hard to miss.",
"latinName": "Cardinalis cardinalis",
"url": "https://en.wikipedia.org/wiki/Red_cardinal",
"colors": { "colors": {
"beak": "#d93619", "beak": "#d93619",
"foot": "#af8e75", "foot": "#af8e75",
@@ -311,6 +321,8 @@
"americanGoldfinch": { "americanGoldfinch": {
"name": "American Goldfinch", "name": "American Goldfinch",
"description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.", "description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.",
"latinName": "Spinus tristis",
"url": "https://en.wikipedia.org/wiki/American_goldfinch",
"colors": { "colors": {
"beak": "#ffaf34", "beak": "#ffaf34",
"foot": "#af8e75", "foot": "#af8e75",
@@ -327,6 +339,8 @@
"barnSwallow": { "barnSwallow": {
"name": "Barn Swallow", "name": "Barn Swallow",
"description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", "description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.",
"latinName": "Hirundo rustica",
"url": "https://en.wikipedia.org/wiki/Barn_swallow",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#db7c4d", "face": "#db7c4d",
@@ -340,6 +354,8 @@
"mistletoebird": { "mistletoebird": {
"name": "Mistletoebird", "name": "Mistletoebird",
"description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.", "description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.",
"latinName": "Dicaeum hirundinaceum",
"url": "https://en.wikipedia.org/wiki/Mistletoebird",
"colors": { "colors": {
"foot": "#6c6a7c", "foot": "#6c6a7c",
"face": "#352e6d", "face": "#352e6d",
@@ -352,6 +368,8 @@
"scarletRobin": { "scarletRobin": {
"name": "Scarlet Robin", "name": "Scarlet Robin",
"description": "Native to Australia, this striking robin can be found in Eucalyptus forests.", "description": "Native to Australia, this striking robin can be found in Eucalyptus forests.",
"latinName": "Petroica boodang",
"url": "https://en.wikipedia.org/wiki/Scarlet_robin",
"colors": { "colors": {
"foot": "#494949", "foot": "#494949",
"face": "#3d3d3d", "face": "#3d3d3d",
@@ -366,6 +384,8 @@
"americanRobin": { "americanRobin": {
"name": "American Robin", "name": "American Robin",
"description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.", "description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.",
"latinName": "Turdus migratorius",
"url": "https://en.wikipedia.org/wiki/American_robin",
"colors": { "colors": {
"beak": "#e89f30", "beak": "#e89f30",
"foot": "#9f8075", "foot": "#9f8075",
@@ -380,6 +400,8 @@
"carolinaWren": { "carolinaWren": {
"name": "Carolina Wren", "name": "Carolina Wren",
"description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.", "description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.",
"latinName": "Thryothorus ludovicianus",
"url": "https://en.wikipedia.org/wiki/Carolina_wren",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#edc7a9", "face": "#edc7a9",
@@ -394,6 +416,8 @@
"blackCappedChickadee": { "blackCappedChickadee": {
"name": "Black-capped Chickadee", "name": "Black-capped Chickadee",
"description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.", "description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.",
"latinName": "Poecile atricapillus",
"url": "https://en.wikipedia.org/wiki/Black-capped_chickadee",
"colors": { "colors": {
"hood": "#363636", "hood": "#363636",
"cheek": "#363636", "cheek": "#363636",
@@ -413,6 +437,8 @@
"blueJay": { "blueJay": {
"name": "Blue Jay", "name": "Blue Jay",
"description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.", "description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.",
"latinName": "Cyanocitta cristata",
"url": "https://en.wikipedia.org/wiki/Blue_jay",
"colors": { "colors": {
"foot": "#5a626b", "foot": "#5a626b",
"face": "#ebf2ff", "face": "#ebf2ff",
@@ -432,6 +458,8 @@
"darkEyedJunco": { "darkEyedJunco": {
"name": "Dark-eyed Junco", "name": "Dark-eyed Junco",
"description": "Native across North America, these social birds will often be seen hopping along the ground in winter.", "description": "Native across North America, these social birds will often be seen hopping along the ground in winter.",
"latinName": "Junco hyemalis",
"url": "https://en.wikipedia.org/wiki/Dark-eyed_junco",
"colors": { "colors": {
"face": "#55565e", "face": "#55565e",
"wing": "#5c5f69", "wing": "#5c5f69",
@@ -445,6 +473,8 @@
"houseFinch": { "houseFinch": {
"name": "House Finch", "name": "House Finch",
"description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.", "description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.",
"latinName": "Haemorhous mexicanus",
"url": "https://en.wikipedia.org/wiki/House_finch",
"colors": { "colors": {
"face": "#cc3a3f", "face": "#cc3a3f",
"wing": "#ae8e78", "wing": "#ae8e78",
@@ -461,6 +491,8 @@
"pigeon": { "pigeon": {
"name": "Pigeon", "name": "Pigeon",
"description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.", "description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.",
"latinName": "Columba livia",
"url": "https://en.wikipedia.org/wiki/Rock_dove",
"colors": { "colors": {
"foot": "#ef6e5b", "foot": "#ef6e5b",
"face": "#5a6c91", "face": "#5a6c91",
@@ -474,6 +506,8 @@
"redAvadavat": { "redAvadavat": {
"name": "Red Avadavat", "name": "Red Avadavat",
"description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.", "description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.",
"latinName": "Amandava amandava",
"url": "https://en.wikipedia.org/wiki/Red_avadavat",
"colors": { "colors": {
"beak": "#f71919", "beak": "#f71919",
"foot": "#af7575", "foot": "#af7575",
@@ -489,6 +523,8 @@
"pinkRobin": { "pinkRobin": {
"name": "Pink Robin", "name": "Pink Robin",
"description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.", "description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.",
"latinName": "Petroica rodinogaster",
"url": "https://en.wikipedia.org/wiki/Pink_robin",
"colors": { "colors": {
"face": "#403a46", "face": "#403a46",
"wing": "#38333d", "wing": "#38333d",
@@ -503,6 +539,8 @@
"redWarbler": { "redWarbler": {
"name": "Red Warbler", "name": "Red Warbler",
"description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.", "description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.",
"latinName": "Cardellina rubra",
"url": "https://en.wikipedia.org/wiki/Red_warbler",
"colors": { "colors": {
"face": "#e80a28", "face": "#e80a28",
"belly": "#d90921", "belly": "#d90921",
@@ -522,6 +560,8 @@
"elegantEuphonia": { "elegantEuphonia": {
"name": "Elegant Euphonia", "name": "Elegant Euphonia",
"description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.", "description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.",
"latinName": "Chlorophonia elegantissima",
"url": "https://en.wikipedia.org/wiki/Elegant_euphonia",
"colors": { "colors": {
"wing": "#101480", "wing": "#101480",
"wing-edge": "#070956", "wing-edge": "#070956",
@@ -649,13 +689,17 @@
/** /**
* @param {string} name * @param {string} name
* @param {string} description * @param {string} description
* @param {string} latinName
* @param {string} url
* @param {Record<string, string>} colors * @param {Record<string, string>} colors
* @param {string[]} [tags] * @param {string[]} [tags]
* @param {Rarity} [rarity] * @param {Rarity} [rarity]
*/ */
constructor(name, description, colors, tags = [], rarity = RARITY.FAMILIAR) { constructor(name, description, latinName, url, colors, tags = [], rarity = RARITY.FAMILIAR) {
this.name = name; this.name = name;
this.description = description; this.description = description;
this.latinName = latinName;
this.url = url;
const defaultColors = { const defaultColors = {
[PALETTE.TRANSPARENT]: "transparent", [PALETTE.TRANSPARENT]: "transparent",
[PALETTE.OUTLINE]: "#000000", [PALETTE.OUTLINE]: "#000000",
@@ -749,7 +793,7 @@
const SPECIES = Object.fromEntries( const SPECIES = Object.fromEntries(
Object.entries(species).map(([id, data]) => [ Object.entries(species).map(([id, data]) => [
id, id,
new BirdType(data.name, data.description, data.colors, data.tags, data.rarity) new BirdType(data.name, data.description, data.latinName, data.url, data.colors, data.tags, data.rarity)
]), ]),
); );
@@ -2304,6 +2348,13 @@
color: #7c6c4b; color: #7c6c4b;
} }
.birb-field-guide-latin-name {
text-decoration: underline;
font-style: italic;
font-weight: bold;
color: inherit;
}
#birb-feather { #birb-feather {
cursor: pointer; cursor: pointer;
} }
@@ -3072,14 +3123,26 @@
const boldName = document.createElement("b"); const boldName = document.createElement("b");
boldName.textContent = type.name; boldName.textContent = type.name;
const spacer = document.createElement("div");
spacer.style.height = "0.3em"; const spacerOne = document.createElement("div");
spacerOne.style.height = "0.3em";
const latinName = document.createElement("a");
latinName.className = "birb-field-guide-latin-name";
latinName.textContent = type.latinName;
latinName.href = type.url;
latinName.target = "_blank";
const spacerTwo = document.createElement("div");
spacerTwo.style.height = "0.3em";
const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description); const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description);
const fragment = document.createDocumentFragment(); const fragment = document.createDocumentFragment();
fragment.appendChild(boldName); fragment.appendChild(boldName);
fragment.appendChild(spacer); fragment.appendChild(spacerOne);
fragment.appendChild(latinName);
fragment.appendChild(spacerTwo);
fragment.appendChild(descText); fragment.appendChild(descText);
return fragment; return fragment;

73
dist/web/birb.js vendored
View File

@@ -237,6 +237,8 @@
"bluebird": { "bluebird": {
"name": "Eastern Bluebird", "name": "Eastern Bluebird",
"description": "Native to North American and very social, though can be timid around people.", "description": "Native to North American and very social, though can be timid around people.",
"latinName": "Sialia sialis",
"url": "https://en.wikipedia.org/wiki/Eastern_bluebird",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#639bff", "face": "#639bff",
@@ -249,6 +251,8 @@
"shimaEnaga": { "shimaEnaga": {
"name": "Shima Enaga", "name": "Shima Enaga",
"description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.", "description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.",
"latinName": "Aegithalos caudatus",
"url": "https://en.wikipedia.org/wiki/Long-tailed_tit",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffffff", "face": "#ffffff",
@@ -262,6 +266,8 @@
"tuftedTitmouse": { "tuftedTitmouse": {
"name": "Tufted Titmouse", "name": "Tufted Titmouse",
"description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.", "description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.",
"latinName": "Baeolophus bicolor",
"url": "https://en.wikipedia.org/wiki/Tufted_titmouse",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#c7cad7", "face": "#c7cad7",
@@ -278,6 +284,8 @@
"europeanRobin": { "europeanRobin": {
"name": "European Robin", "name": "European Robin",
"description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.", "description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.",
"latinName": "Erithacus rubecula",
"url": "https://en.wikipedia.org/wiki/European_robin",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffaf34", "face": "#ffaf34",
@@ -292,6 +300,8 @@
"redCardinal": { "redCardinal": {
"name": "Red Cardinal", "name": "Red Cardinal",
"description": "Native to the eastern United States, this strikingly red bird is hard to miss.", "description": "Native to the eastern United States, this strikingly red bird is hard to miss.",
"latinName": "Cardinalis cardinalis",
"url": "https://en.wikipedia.org/wiki/Red_cardinal",
"colors": { "colors": {
"beak": "#d93619", "beak": "#d93619",
"foot": "#af8e75", "foot": "#af8e75",
@@ -311,6 +321,8 @@
"americanGoldfinch": { "americanGoldfinch": {
"name": "American Goldfinch", "name": "American Goldfinch",
"description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.", "description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.",
"latinName": "Spinus tristis",
"url": "https://en.wikipedia.org/wiki/American_goldfinch",
"colors": { "colors": {
"beak": "#ffaf34", "beak": "#ffaf34",
"foot": "#af8e75", "foot": "#af8e75",
@@ -327,6 +339,8 @@
"barnSwallow": { "barnSwallow": {
"name": "Barn Swallow", "name": "Barn Swallow",
"description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", "description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.",
"latinName": "Hirundo rustica",
"url": "https://en.wikipedia.org/wiki/Barn_swallow",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#db7c4d", "face": "#db7c4d",
@@ -340,6 +354,8 @@
"mistletoebird": { "mistletoebird": {
"name": "Mistletoebird", "name": "Mistletoebird",
"description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.", "description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.",
"latinName": "Dicaeum hirundinaceum",
"url": "https://en.wikipedia.org/wiki/Mistletoebird",
"colors": { "colors": {
"foot": "#6c6a7c", "foot": "#6c6a7c",
"face": "#352e6d", "face": "#352e6d",
@@ -352,6 +368,8 @@
"scarletRobin": { "scarletRobin": {
"name": "Scarlet Robin", "name": "Scarlet Robin",
"description": "Native to Australia, this striking robin can be found in Eucalyptus forests.", "description": "Native to Australia, this striking robin can be found in Eucalyptus forests.",
"latinName": "Petroica boodang",
"url": "https://en.wikipedia.org/wiki/Scarlet_robin",
"colors": { "colors": {
"foot": "#494949", "foot": "#494949",
"face": "#3d3d3d", "face": "#3d3d3d",
@@ -366,6 +384,8 @@
"americanRobin": { "americanRobin": {
"name": "American Robin", "name": "American Robin",
"description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.", "description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.",
"latinName": "Turdus migratorius",
"url": "https://en.wikipedia.org/wiki/American_robin",
"colors": { "colors": {
"beak": "#e89f30", "beak": "#e89f30",
"foot": "#9f8075", "foot": "#9f8075",
@@ -380,6 +400,8 @@
"carolinaWren": { "carolinaWren": {
"name": "Carolina Wren", "name": "Carolina Wren",
"description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.", "description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.",
"latinName": "Thryothorus ludovicianus",
"url": "https://en.wikipedia.org/wiki/Carolina_wren",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#edc7a9", "face": "#edc7a9",
@@ -394,6 +416,8 @@
"blackCappedChickadee": { "blackCappedChickadee": {
"name": "Black-capped Chickadee", "name": "Black-capped Chickadee",
"description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.", "description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.",
"latinName": "Poecile atricapillus",
"url": "https://en.wikipedia.org/wiki/Black-capped_chickadee",
"colors": { "colors": {
"hood": "#363636", "hood": "#363636",
"cheek": "#363636", "cheek": "#363636",
@@ -413,6 +437,8 @@
"blueJay": { "blueJay": {
"name": "Blue Jay", "name": "Blue Jay",
"description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.", "description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.",
"latinName": "Cyanocitta cristata",
"url": "https://en.wikipedia.org/wiki/Blue_jay",
"colors": { "colors": {
"foot": "#5a626b", "foot": "#5a626b",
"face": "#ebf2ff", "face": "#ebf2ff",
@@ -432,6 +458,8 @@
"darkEyedJunco": { "darkEyedJunco": {
"name": "Dark-eyed Junco", "name": "Dark-eyed Junco",
"description": "Native across North America, these social birds will often be seen hopping along the ground in winter.", "description": "Native across North America, these social birds will often be seen hopping along the ground in winter.",
"latinName": "Junco hyemalis",
"url": "https://en.wikipedia.org/wiki/Dark-eyed_junco",
"colors": { "colors": {
"face": "#55565e", "face": "#55565e",
"wing": "#5c5f69", "wing": "#5c5f69",
@@ -445,6 +473,8 @@
"houseFinch": { "houseFinch": {
"name": "House Finch", "name": "House Finch",
"description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.", "description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.",
"latinName": "Haemorhous mexicanus",
"url": "https://en.wikipedia.org/wiki/House_finch",
"colors": { "colors": {
"face": "#cc3a3f", "face": "#cc3a3f",
"wing": "#ae8e78", "wing": "#ae8e78",
@@ -461,6 +491,8 @@
"pigeon": { "pigeon": {
"name": "Pigeon", "name": "Pigeon",
"description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.", "description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.",
"latinName": "Columba livia",
"url": "https://en.wikipedia.org/wiki/Rock_dove",
"colors": { "colors": {
"foot": "#ef6e5b", "foot": "#ef6e5b",
"face": "#5a6c91", "face": "#5a6c91",
@@ -474,6 +506,8 @@
"redAvadavat": { "redAvadavat": {
"name": "Red Avadavat", "name": "Red Avadavat",
"description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.", "description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.",
"latinName": "Amandava amandava",
"url": "https://en.wikipedia.org/wiki/Red_avadavat",
"colors": { "colors": {
"beak": "#f71919", "beak": "#f71919",
"foot": "#af7575", "foot": "#af7575",
@@ -489,6 +523,8 @@
"pinkRobin": { "pinkRobin": {
"name": "Pink Robin", "name": "Pink Robin",
"description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.", "description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.",
"latinName": "Petroica rodinogaster",
"url": "https://en.wikipedia.org/wiki/Pink_robin",
"colors": { "colors": {
"face": "#403a46", "face": "#403a46",
"wing": "#38333d", "wing": "#38333d",
@@ -503,6 +539,8 @@
"redWarbler": { "redWarbler": {
"name": "Red Warbler", "name": "Red Warbler",
"description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.", "description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.",
"latinName": "Cardellina rubra",
"url": "https://en.wikipedia.org/wiki/Red_warbler",
"colors": { "colors": {
"face": "#e80a28", "face": "#e80a28",
"belly": "#d90921", "belly": "#d90921",
@@ -522,6 +560,8 @@
"elegantEuphonia": { "elegantEuphonia": {
"name": "Elegant Euphonia", "name": "Elegant Euphonia",
"description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.", "description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.",
"latinName": "Chlorophonia elegantissima",
"url": "https://en.wikipedia.org/wiki/Elegant_euphonia",
"colors": { "colors": {
"wing": "#101480", "wing": "#101480",
"wing-edge": "#070956", "wing-edge": "#070956",
@@ -649,13 +689,17 @@
/** /**
* @param {string} name * @param {string} name
* @param {string} description * @param {string} description
* @param {string} latinName
* @param {string} url
* @param {Record<string, string>} colors * @param {Record<string, string>} colors
* @param {string[]} [tags] * @param {string[]} [tags]
* @param {Rarity} [rarity] * @param {Rarity} [rarity]
*/ */
constructor(name, description, colors, tags = [], rarity = RARITY.FAMILIAR) { constructor(name, description, latinName, url, colors, tags = [], rarity = RARITY.FAMILIAR) {
this.name = name; this.name = name;
this.description = description; this.description = description;
this.latinName = latinName;
this.url = url;
const defaultColors = { const defaultColors = {
[PALETTE.TRANSPARENT]: "transparent", [PALETTE.TRANSPARENT]: "transparent",
[PALETTE.OUTLINE]: "#000000", [PALETTE.OUTLINE]: "#000000",
@@ -749,7 +793,7 @@
const SPECIES = Object.fromEntries( const SPECIES = Object.fromEntries(
Object.entries(species).map(([id, data]) => [ Object.entries(species).map(([id, data]) => [
id, id,
new BirdType(data.name, data.description, data.colors, data.tags, data.rarity) new BirdType(data.name, data.description, data.latinName, data.url, data.colors, data.tags, data.rarity)
]), ]),
); );
@@ -2304,6 +2348,13 @@
color: #7c6c4b; color: #7c6c4b;
} }
.birb-field-guide-latin-name {
text-decoration: underline;
font-style: italic;
font-weight: bold;
color: inherit;
}
#birb-feather { #birb-feather {
cursor: pointer; cursor: pointer;
} }
@@ -3072,14 +3123,26 @@
const boldName = document.createElement("b"); const boldName = document.createElement("b");
boldName.textContent = type.name; boldName.textContent = type.name;
const spacer = document.createElement("div");
spacer.style.height = "0.3em"; const spacerOne = document.createElement("div");
spacerOne.style.height = "0.3em";
const latinName = document.createElement("a");
latinName.className = "birb-field-guide-latin-name";
latinName.textContent = type.latinName;
latinName.href = type.url;
latinName.target = "_blank";
const spacerTwo = document.createElement("div");
spacerTwo.style.height = "0.3em";
const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description); const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description);
const fragment = document.createDocumentFragment(); const fragment = document.createDocumentFragment();
fragment.appendChild(boldName); fragment.appendChild(boldName);
fragment.appendChild(spacer); fragment.appendChild(spacerOne);
fragment.appendChild(latinName);
fragment.appendChild(spacerTwo);
fragment.appendChild(descText); fragment.appendChild(descText);
return fragment; return fragment;

View File

@@ -107,13 +107,17 @@ export class BirdType {
/** /**
* @param {string} name * @param {string} name
* @param {string} description * @param {string} description
* @param {string} latinName
* @param {string} url
* @param {Record<string, string>} colors * @param {Record<string, string>} colors
* @param {string[]} [tags] * @param {string[]} [tags]
* @param {Rarity} [rarity] * @param {Rarity} [rarity]
*/ */
constructor(name, description, colors, tags = [], rarity = RARITY.FAMILIAR) { constructor(name, description, latinName, url, colors, tags = [], rarity = RARITY.FAMILIAR) {
this.name = name; this.name = name;
this.description = description; this.description = description;
this.latinName = latinName;
this.url = url;
const defaultColors = { const defaultColors = {
[PALETTE.TRANSPARENT]: "transparent", [PALETTE.TRANSPARENT]: "transparent",
[PALETTE.OUTLINE]: "#000000", [PALETTE.OUTLINE]: "#000000",
@@ -207,6 +211,6 @@ export function loadSpriteSheetPixels(src, templateColors = true) {
export const SPECIES = Object.fromEntries( export const SPECIES = Object.fromEntries(
Object.entries(species).map(([id, data]) => [ Object.entries(species).map(([id, data]) => [
id, id,
new BirdType(data.name, data.description, data.colors, data.tags, data.rarity) new BirdType(data.name, data.description, data.latinName, data.url, data.colors, data.tags, data.rarity)
]), ]),
); );

View File

@@ -793,14 +793,26 @@ function startApplication(birbPixels, featherPixels, hatsPixels) {
const boldName = document.createElement("b"); const boldName = document.createElement("b");
boldName.textContent = type.name; boldName.textContent = type.name;
const spacer = document.createElement("div");
spacer.style.height = "0.3em"; const spacerOne = document.createElement("div");
spacerOne.style.height = "0.3em";
const latinName = document.createElement("a");
latinName.className = "birb-field-guide-latin-name";
latinName.textContent = type.latinName;
latinName.href = type.url;
latinName.target = "_blank";
const spacerTwo = document.createElement("div");
spacerTwo.style.height = "0.3em";
const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description); const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description);
const fragment = document.createDocumentFragment(); const fragment = document.createDocumentFragment();
fragment.appendChild(boldName); fragment.appendChild(boldName);
fragment.appendChild(spacer); fragment.appendChild(spacerOne);
fragment.appendChild(latinName);
fragment.appendChild(spacerTwo);
fragment.appendChild(descText); fragment.appendChild(descText);
return fragment; return fragment;

View File

@@ -9,6 +9,8 @@ export default {
"bluebird": { "bluebird": {
"name": "Eastern Bluebird", "name": "Eastern Bluebird",
"description": "Native to North American and very social, though can be timid around people.", "description": "Native to North American and very social, though can be timid around people.",
"latinName": "Sialia sialis",
"url": "https://en.wikipedia.org/wiki/Eastern_bluebird",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#639bff", "face": "#639bff",
@@ -21,6 +23,8 @@ export default {
"shimaEnaga": { "shimaEnaga": {
"name": "Shima Enaga", "name": "Shima Enaga",
"description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.", "description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.",
"latinName": "Aegithalos caudatus",
"url": "https://en.wikipedia.org/wiki/Long-tailed_tit",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffffff", "face": "#ffffff",
@@ -34,6 +38,8 @@ export default {
"tuftedTitmouse": { "tuftedTitmouse": {
"name": "Tufted Titmouse", "name": "Tufted Titmouse",
"description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.", "description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.",
"latinName": "Baeolophus bicolor",
"url": "https://en.wikipedia.org/wiki/Tufted_titmouse",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#c7cad7", "face": "#c7cad7",
@@ -50,6 +56,8 @@ export default {
"europeanRobin": { "europeanRobin": {
"name": "European Robin", "name": "European Robin",
"description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.", "description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.",
"latinName": "Erithacus rubecula",
"url": "https://en.wikipedia.org/wiki/European_robin",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#ffaf34", "face": "#ffaf34",
@@ -64,6 +72,8 @@ export default {
"redCardinal": { "redCardinal": {
"name": "Red Cardinal", "name": "Red Cardinal",
"description": "Native to the eastern United States, this strikingly red bird is hard to miss.", "description": "Native to the eastern United States, this strikingly red bird is hard to miss.",
"latinName": "Cardinalis cardinalis",
"url": "https://en.wikipedia.org/wiki/Red_cardinal",
"colors": { "colors": {
"beak": "#d93619", "beak": "#d93619",
"foot": "#af8e75", "foot": "#af8e75",
@@ -83,6 +93,8 @@ export default {
"americanGoldfinch": { "americanGoldfinch": {
"name": "American Goldfinch", "name": "American Goldfinch",
"description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.", "description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.",
"latinName": "Spinus tristis",
"url": "https://en.wikipedia.org/wiki/American_goldfinch",
"colors": { "colors": {
"beak": "#ffaf34", "beak": "#ffaf34",
"foot": "#af8e75", "foot": "#af8e75",
@@ -99,6 +111,8 @@ export default {
"barnSwallow": { "barnSwallow": {
"name": "Barn Swallow", "name": "Barn Swallow",
"description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", "description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.",
"latinName": "Hirundo rustica",
"url": "https://en.wikipedia.org/wiki/Barn_swallow",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#db7c4d", "face": "#db7c4d",
@@ -112,6 +126,8 @@ export default {
"mistletoebird": { "mistletoebird": {
"name": "Mistletoebird", "name": "Mistletoebird",
"description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.", "description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.",
"latinName": "Dicaeum hirundinaceum",
"url": "https://en.wikipedia.org/wiki/Mistletoebird",
"colors": { "colors": {
"foot": "#6c6a7c", "foot": "#6c6a7c",
"face": "#352e6d", "face": "#352e6d",
@@ -124,6 +140,8 @@ export default {
"scarletRobin": { "scarletRobin": {
"name": "Scarlet Robin", "name": "Scarlet Robin",
"description": "Native to Australia, this striking robin can be found in Eucalyptus forests.", "description": "Native to Australia, this striking robin can be found in Eucalyptus forests.",
"latinName": "Petroica boodang",
"url": "https://en.wikipedia.org/wiki/Scarlet_robin",
"colors": { "colors": {
"foot": "#494949", "foot": "#494949",
"face": "#3d3d3d", "face": "#3d3d3d",
@@ -138,6 +156,8 @@ export default {
"americanRobin": { "americanRobin": {
"name": "American Robin", "name": "American Robin",
"description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.", "description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.",
"latinName": "Turdus migratorius",
"url": "https://en.wikipedia.org/wiki/American_robin",
"colors": { "colors": {
"beak": "#e89f30", "beak": "#e89f30",
"foot": "#9f8075", "foot": "#9f8075",
@@ -152,6 +172,8 @@ export default {
"carolinaWren": { "carolinaWren": {
"name": "Carolina Wren", "name": "Carolina Wren",
"description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.", "description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.",
"latinName": "Thryothorus ludovicianus",
"url": "https://en.wikipedia.org/wiki/Carolina_wren",
"colors": { "colors": {
"foot": "#af8e75", "foot": "#af8e75",
"face": "#edc7a9", "face": "#edc7a9",
@@ -166,6 +188,8 @@ export default {
"blackCappedChickadee": { "blackCappedChickadee": {
"name": "Black-capped Chickadee", "name": "Black-capped Chickadee",
"description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.", "description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.",
"latinName": "Poecile atricapillus",
"url": "https://en.wikipedia.org/wiki/Black-capped_chickadee",
"colors": { "colors": {
"hood": "#363636", "hood": "#363636",
"cheek": "#363636", "cheek": "#363636",
@@ -185,6 +209,8 @@ export default {
"blueJay": { "blueJay": {
"name": "Blue Jay", "name": "Blue Jay",
"description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.", "description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.",
"latinName": "Cyanocitta cristata",
"url": "https://en.wikipedia.org/wiki/Blue_jay",
"colors": { "colors": {
"foot": "#5a626b", "foot": "#5a626b",
"face": "#ebf2ff", "face": "#ebf2ff",
@@ -204,6 +230,8 @@ export default {
"darkEyedJunco": { "darkEyedJunco": {
"name": "Dark-eyed Junco", "name": "Dark-eyed Junco",
"description": "Native across North America, these social birds will often be seen hopping along the ground in winter.", "description": "Native across North America, these social birds will often be seen hopping along the ground in winter.",
"latinName": "Junco hyemalis",
"url": "https://en.wikipedia.org/wiki/Dark-eyed_junco",
"colors": { "colors": {
"face": "#55565e", "face": "#55565e",
"wing": "#5c5f69", "wing": "#5c5f69",
@@ -217,6 +245,8 @@ export default {
"houseFinch": { "houseFinch": {
"name": "House Finch", "name": "House Finch",
"description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.", "description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.",
"latinName": "Haemorhous mexicanus",
"url": "https://en.wikipedia.org/wiki/House_finch",
"colors": { "colors": {
"face": "#cc3a3f", "face": "#cc3a3f",
"wing": "#ae8e78", "wing": "#ae8e78",
@@ -233,6 +263,8 @@ export default {
"pigeon": { "pigeon": {
"name": "Pigeon", "name": "Pigeon",
"description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.", "description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.",
"latinName": "Columba livia",
"url": "https://en.wikipedia.org/wiki/Rock_dove",
"colors": { "colors": {
"foot": "#ef6e5b", "foot": "#ef6e5b",
"face": "#5a6c91", "face": "#5a6c91",
@@ -246,6 +278,8 @@ export default {
"redAvadavat": { "redAvadavat": {
"name": "Red Avadavat", "name": "Red Avadavat",
"description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.", "description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.",
"latinName": "Amandava amandava",
"url": "https://en.wikipedia.org/wiki/Red_avadavat",
"colors": { "colors": {
"beak": "#f71919", "beak": "#f71919",
"foot": "#af7575", "foot": "#af7575",
@@ -261,6 +295,8 @@ export default {
"pinkRobin": { "pinkRobin": {
"name": "Pink Robin", "name": "Pink Robin",
"description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.", "description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.",
"latinName": "Petroica rodinogaster",
"url": "https://en.wikipedia.org/wiki/Pink_robin",
"colors": { "colors": {
"face": "#403a46", "face": "#403a46",
"wing": "#38333d", "wing": "#38333d",
@@ -275,6 +311,8 @@ export default {
"redWarbler": { "redWarbler": {
"name": "Red Warbler", "name": "Red Warbler",
"description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.", "description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.",
"latinName": "Cardellina rubra",
"url": "https://en.wikipedia.org/wiki/Red_warbler",
"colors": { "colors": {
"face": "#e80a28", "face": "#e80a28",
"belly": "#d90921", "belly": "#d90921",
@@ -294,6 +332,8 @@ export default {
"elegantEuphonia": { "elegantEuphonia": {
"name": "Elegant Euphonia", "name": "Elegant Euphonia",
"description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.", "description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.",
"latinName": "Chlorophonia elegantissima",
"url": "https://en.wikipedia.org/wiki/Elegant_euphonia",
"colors": { "colors": {
"wing": "#101480", "wing": "#101480",
"wing-edge": "#070956", "wing-edge": "#070956",

View File

@@ -336,6 +336,13 @@
color: #7c6c4b; color: #7c6c4b;
} }
.birb-field-guide-latin-name {
text-decoration: underline;
font-style: italic;
font-weight: bold;
color: inherit;
}
#birb-feather { #birb-feather {
cursor: pointer; cursor: pointer;
} }