Add other palette items and toggles

This commit is contained in:
Idrees Hassan
2026-03-11 15:46:38 -07:00
parent a2dea8a17d
commit 80bcf60a07
10 changed files with 68 additions and 38 deletions

10
dist/web/birb.js vendored
View File

@@ -406,7 +406,9 @@
EYE: "eye",
FACE: "face",
HOOD: "hood",
EYEBROW: "eyebrow",
NOSE: "nose",
CHEEK: "cheek",
BELLY: "belly",
UNDERBELLY: "underbelly",
WING: "wing",
@@ -431,7 +433,9 @@
"#af8e75": PALETTE.FOOT,
"#639bff": PALETTE.FACE,
"#99e550": PALETTE.HOOD,
"#ff5573": PALETTE.EYEBROW,
"#d95763": PALETTE.NOSE,
"#ff67a9": PALETTE.CHEEK,
"#f8b143": PALETTE.BELLY,
"#ec8637": PALETTE.UNDERBELLY,
"#578ae6": PALETTE.WING,
@@ -463,7 +467,9 @@
[PALETTE.HEART_SHINE]: "#ff6b6b",
[PALETTE.FEATHER_SPINE]: "#373737",
[PALETTE.HOOD]: colors.face,
[PALETTE.EYEBROW]: colors.face,
[PALETTE.NOSE]: colors.face,
[PALETTE.CHEEK]: colors.face,
};
/** @type {Record<string, string>} */
this.colors = { ...defaultColors, ...colors, [PALETTE.THEME_HIGHLIGHT]: colors[PALETTE.THEME_HIGHLIGHT] ?? colors.hood ?? colors.face };
@@ -473,8 +479,8 @@
/**
* Load a sprite sheet image and convert it to a 2D array of palette color names
* @param {string} src - URL or data URI of the sprite sheet image
* @param {boolean} [templateColors] - Whether to map pixel colors to palette names
* @param {string} src URL or data URI of the sprite sheet image
* @param {boolean} [templateColors] Whether to map pixel colors to palette names
* @returns {Promise<string[][]>}
*/
function loadSpriteSheetPixels(src, templateColors = true) {