feat: birch

This commit is contained in:
Dan Finch 2026-08-07 13:01:32 +02:00
parent 16f205babe
commit a4490f7a20
11 changed files with 110 additions and 24 deletions

View file

@ -1,6 +1,7 @@
import type { Texture } from "../engine/render/Texture"
import barkUrl from "../assets/bark.png"
import beeUrl from "../assets/bee.png"
import birchUrl from "../assets/birch.png"
import crateUrl from "../assets/crate.png"
import floorUrl from "../assets/floor.png"
import flowerUrl from "../assets/flower.png"
@ -16,6 +17,7 @@ export type Textures = {
floor: Texture
grass: Texture
bark: Texture
birch: Texture
leaf: Texture
needle: Texture
rock: Texture
@ -29,10 +31,11 @@ export type Textures = {
/** Load every game texture up front. Call once before starting the loop. */
export async function loadTextures(): Promise<Textures> {
const [floor, grass, bark, leaf, needle, rock, flower, wall, crate, npc, frog, bee] = await Promise.all([
const [floor, grass, bark, birch, leaf, needle, rock, flower, wall, crate, npc, frog, bee] = await Promise.all([
loadTexture(floorUrl),
loadTexture(grassUrl),
loadTexture(barkUrl),
loadTexture(birchUrl),
loadTexture(leafUrl),
loadTexture(needleUrl),
loadTexture(rockUrl),
@ -43,7 +46,7 @@ export async function loadTextures(): Promise<Textures> {
loadTexture(frogUrl),
loadTexture(beeUrl),
])
return { floor, grass, bark, leaf, needle, rock, flower, wall, crate, npc, frog, bee }
return { floor, grass, bark, birch, leaf, needle, rock, flower, wall, crate, npc, frog, bee }
}
function loadTexture(url: string): Promise<Texture> {