From 3b4ab02d9217a6ebe1da8bbaeae39c433e58e185 Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Thu, 26 Sep 2024 15:45:19 +0200 Subject: [PATCH] Fix 1 pixel misalignment in non clip mode. --- spine-ts/spine-webgl/src/SpineWebComponentWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts b/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts index 4b7e8cf01..bf99d2a2b 100644 --- a/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts +++ b/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts @@ -1025,7 +1025,7 @@ class SpineWebComponentOverlay extends HTMLElement { } else { // get the desired point into the the div (center by default) in world coordinate const divX = divBounds.x + divBounds.width * (xAxis + .5); - const divY = divBounds.y + divBounds.height * (-yAxis + .5); + const divY = divBounds.y + divBounds.height * (-yAxis + .5) - 1; this.screenToWorld(tempVector, divX, divY); divOriginX = tempVector.x; divOriginY = tempVector.y;