USE OFFSET

This commit is contained in:
Schluffe
2026-04-05 11:39:53 +02:00
parent f574804f68
commit f9b7e16376
11 changed files with 179 additions and 133 deletions
+5 -1
View File
@@ -23,6 +23,7 @@ const sprites = {
yStart: 0,
width: 16,
height: 16,
offset: createVector(-8, -8),
},
walk: {
src: srcs.walk,
@@ -30,6 +31,7 @@ const sprites = {
yStart: 0,
width: 16,
height: 16,
offset: createVector(-8, -8),
},
};
@@ -38,6 +40,8 @@ const animations = {
walk: createSpriteAnimation(250, 2),
};
const position = createVector();
const process = defineEntity<{
position: Vector;
animation: SpriteAnimation;
@@ -52,7 +56,7 @@ const process = defineEntity<{
};
stuff: number;
}>("testEntity", {
position: createVector(),
position,
animation: animations.idle,
animations: animations,
sprite: sprites.idle,