aboutsummaryrefslogtreecommitdiffstats
path: root/src/Images.ts
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2022-06-02 11:59:01 +0200
committerMaksymilian Jopek <maks@jopek.eu>2022-06-02 11:59:01 +0200
commitef76266d1a61c02f1721efedc830fab12279d2b9 (patch)
treeede2722261bf896c821ad3119d397ee2b5317027 /src/Images.ts
parent6c37585ef4ef2535aff8c45c64850be0a6c26eab (diff)
download1942-ef76266d1a61c02f1721efedc830fab12279d2b9.tar.gz
1942-ef76266d1a61c02f1721efedc830fab12279d2b9.tar.zst
1942-ef76266d1a61c02f1721efedc830fab12279d2b9.zip
Merge + startAnim imgs
Diffstat (limited to 'src/Images.ts')
-rw-r--r--src/Images.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Images.ts b/src/Images.ts
index 99e9b02..aee7e53 100644
--- a/src/Images.ts
+++ b/src/Images.ts
@@ -120,13 +120,14 @@ export const IMGS = {
},
' ': {} as HTMLImageElement,
},
+ start: {} as any,
selector: {} as HTMLImageElement,
empty: {} as HTMLImageElement,
};
// window.IMGS = IMGS;
export default async function loadAllImages() {
for (const key in IMGS) {
- if (["empty", "font"].includes(key)) continue;
+ if (["empty", "font", "start"].includes(key)) continue;
IMGS[key as keyof typeof IMGS] = await asyncImageLoader("/src/imgs/" + toKebabCase(key) + ".png") as any
}
// for (const color of ['yellow', 'white', 'blue', 'red', 'green', 'purple']) {
@@ -146,6 +147,8 @@ export default async function loadAllImages() {
for (const c of allChars.filter(ch => !alphabet.includes(ch))) {
IMGS.font.small.white[c] = await asyncImageLoader("/src/imgs/font/small/white/" + c + ".png");
}
+ for (let i = 1; i <= 215; i++)
+ IMGS.start[i] = await asyncImageLoader("/src/imgs/start/" + i + ".png");
}
async function asyncImageLoader(url: string): Promise<HTMLImageElement> {
return new Promise((resolve, reject) => {