From c2f3d2628011fc6f50166f1157029b7aa804d82e Mon Sep 17 00:00:00 2001 From: Nico <60229704+Marchand-Nicolas@users.noreply.github.com> Date: Mon, 4 Nov 2024 22:46:24 +0100 Subject: [PATCH] fixing parser --- utils/parser.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/utils/parser.ts b/utils/parser.ts index efa96728..44fbf552 100644 --- a/utils/parser.ts +++ b/utils/parser.ts @@ -138,14 +138,10 @@ export class LdtkReader { }, textureOffset: { x: xOffset, y: yOffset }, textureRepeat: { - x: - 1 / - (spritesPerRow / - ((entity?.tileRect.w ?? 0) / tileset?.tileGridSize ?? 1)), + x: 1 / (spritesPerRow / (entity?.tileRect.w / tileset?.tileGridSize)), y: 1 / - (spritesPerColumn / - ((entity?.tileRect.h ?? 0) / tileset?.tileGridSize ?? 1)), + (spritesPerColumn / (entity?.tileRect.h / tileset?.tileGridSize)), }, z: 0.23, });