From b28ecdb86bfa3fe4796812311641f3d000b3d494 Mon Sep 17 00:00:00 2001 From: Martin Lindberg <30564420+fartinmartin@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:37:25 -0700 Subject: [PATCH] fix center[Left|Right] anchor points --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index c8e3079..d53e09b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -251,9 +251,9 @@ function createBox({ position[0] - size[0] / 2, position[1] + size[1] / 2, ], - centerLeft: (): Vector2D => [position[0] + size[1] / 2, position[1]], + centerLeft: (): Vector2D => [position[0] + size[0] / 2, position[1]], center: (): Vector2D => position, - centerRight: (): Vector2D => [position[0] - size[1] / 2, position[1]], + centerRight: (): Vector2D => [position[0] - size[0] / 2, position[1]], bottomLeft: (): Vector2D => [ position[0] + size[0] / 2, position[1] - size[1] / 2,