diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2022-05-25 22:55:57 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2022-05-25 22:55:57 +0200 |
| commit | 344737031e5bbad5f24469aabf45be6535c893f3 (patch) | |
| tree | 89f7312b24a2f9f6c7d48ddb1f0b5874939f6d21 /src/Images.ts | |
| parent | 2f8b8c87fb2062313afea7b625ccb20d1bea95b9 (diff) | |
| download | 1942-344737031e5bbad5f24469aabf45be6535c893f3.tar.gz 1942-344737031e5bbad5f24469aabf45be6535c893f3.tar.zst 1942-344737031e5bbad5f24469aabf45be6535c893f3.zip | |
Numbers and better rectangles
Diffstat (limited to 'src/Images.ts')
| -rw-r--r-- | src/Images.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Images.ts b/src/Images.ts index f0e1ba0..a6bc1e0 100644 --- a/src/Images.ts +++ b/src/Images.ts @@ -2,7 +2,7 @@ // "/src/imgs/bg2.png", // "/src/imgs/topbar.png", // ]; -import { alphabet } from "./consts"; +import { allChars } from "./consts"; import { toKebabCase } from "./helpers"; export const IMGS = { @@ -27,9 +27,19 @@ export const IMGS = { bigCircleLeftToDown1: {} as HTMLImageElement, bigCircleLeftToDown2: {} as HTMLImageElement, bigCircleLeftToDown3: {} as HTMLImageElement, + simpleDown: {} as HTMLImageElement, + simpleRot1: {} as HTMLImageElement, + simpleRot2: {} as HTMLImageElement, + simpleRot3: {} as HTMLImageElement, + simpleRot4: {} as HTMLImageElement, + simpleUp: {} as HTMLImageElement, // po 4 klatki na sprite font: { white: {} as any, yellow: {} as any, + blue: {} as any, + red: {} as any, + green: {} as any, + purple: {} as any, ' ': {} as HTMLImageElement, }, selector: {} as HTMLImageElement, @@ -42,7 +52,7 @@ export default async function loadAllImages() { IMGS[key as keyof typeof IMGS] = await asyncImageLoader("/src/imgs/" + toKebabCase(key) + ".png") as any } for (const color of ['yellow', 'white']) { - for (const char of [...alphabet]) { + for (const char of allChars) { (((IMGS.font as any)[color] as any)[char]) = await asyncImageLoader("/src/imgs/font/" + color + "/" + encodeURIComponent(char) + ".png") as any } } |
