Add basic controls

This commit is contained in:
kolaflash committed 2026-01-23 14:21:21 +01:00
1 parent 589af23e8c
commit f9a2409dad
19 files changed
+225 -47

No files matched your search

+2 -2
View File
@@ -1,10 +1,10 @@
import { createAnimation, playAnimation } from "#/engine/Animation.ts";
import { useEntity } from "#/engine/Entity.ts";
import { defineEntity } from "#/engine/Entity.ts";
import { fromSrc, type Sprite } from "#/lib/Sprite.ts";
const sprite: Sprite = await fromSrc("./assets/portal.png", 3, 1);
const { animate } = useEntity(import.meta, {
const { animate } = defineEntity("portal", {
animation: createAnimation(sprite, 400, 0),
});