Loading the Sprite Sheet
Let's start by loading our sprite sheet image so we can draw the background.
Image Loader
It would be convenient to use await
to load an image. We'll create a promisifed wrapper around the image loading process to accomplish this.
Image Loading Handlers
Create a new file:
Now let's modify main.ts
to load the sprite sheet:
Importing Assets
With the sprite sheet loaded, we'll draw the background next.