diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-02 04:02:20 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-02 04:02:20 -0700 |
commit | 4b9349b3f8bee21eb086cfd6e7668532a50e6048 (patch) | |
tree | fa3ae95f516d8ec10fb0de57886ff88410b6d11d /src/engine/config | |
parent | 06bb4177202b432d5f42141975ec82b5a8837f0e (diff) | |
download | the-abstraction-engine-4b9349b3f8bee21eb086cfd6e7668532a50e6048.tar.gz the-abstraction-engine-4b9349b3f8bee21eb086cfd6e7668532a50e6048.zip |
add text on lambda factory
Diffstat (limited to 'src/engine/config')
-rw-r--r-- | src/engine/config/assets.ts | 6 | ||||
-rw-r--r-- | src/engine/config/sprites.ts | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/engine/config/assets.ts b/src/engine/config/assets.ts index bf41461..5ce13e8 100644 --- a/src/engine/config/assets.ts +++ b/src/engine/config/assets.ts @@ -1,5 +1,10 @@ import { type SpriteSpec, SPRITE_SPECS } from "."; +export const FONT = new FontFace("scientifica", "url(/fonts/scientifica.ttf)"); +FONT.load().then((font) => { + document.fonts.add(font); +}); + export const IMAGES = new Map<string, HTMLImageElement>(); export const loadSpritesIntoImageElements = ( @@ -37,5 +42,6 @@ export const loadAssets = () => (key) => SPRITE_SPECS.get(key) as SpriteSpec, ), ), + FONT.load(), // TODO: Sound ]); diff --git a/src/engine/config/sprites.ts b/src/engine/config/sprites.ts index 7cb8adf..39ad260 100644 --- a/src/engine/config/sprites.ts +++ b/src/engine/config/sprites.ts @@ -4,6 +4,7 @@ export enum Sprites { PLAYER, FUNCTION_BOX, WALL, + LAMBDA_FACTORY, } export interface SpriteSpec { @@ -56,3 +57,12 @@ const wallSpriteSpec = { sheet: "/assets/wall.png", }; SPRITE_SPECS.set(Sprites.WALL, wallSpriteSpec); + +const lambdaFactorySpriteSpec = { + msPerFrame: 200, + width: 64, + height: 64, + frames: 3, + sheet: "/assets/function_factory.png", +}; +SPRITE_SPECS.set(Sprites.LAMBDA_FACTORY, lambdaFactorySpriteSpec); |