well, that works

This commit is contained in:
kolaflash
2025-11-25 23:59:27 +01:00
parent 104f0998e1
commit 431a0bee2c
4 changed files with 83 additions and 22 deletions
+9 -2
View File
@@ -1,4 +1,11 @@
import { createEntity } from "#/engine/Entity.ts";
import { useEntity } from "#/engine/Entity.ts";
import { drawSprite } from "#/lib/Sprite.ts";
import data from "./data.json";
export default createEntity(data.id, data.src, data.width, data.height);
const { draw, process, entity } = await useEntity(data);
draw((ctx: CanvasRenderingContext2D) => {
drawSprite(ctx, entity.sprite, 0, 0, 16, 16);
});
process((_delta) => {});