From 2fc8f5b3f969da11a7532ce45a54d0fd93d1ad2d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 16 Jul 2024 23:17:40 +0100 Subject: [PATCH] Floor, not round --- src/gameobjects/components/TransformMatrix.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gameobjects/components/TransformMatrix.js b/src/gameobjects/components/TransformMatrix.js index 6a9f9bca4..2156709e7 100644 --- a/src/gameobjects/components/TransformMatrix.js +++ b/src/gameobjects/components/TransformMatrix.js @@ -938,17 +938,17 @@ var TransformMatrix = new Class({ if (roundPixels) { - quad[0] = Math.round(x * a + y * c + e); - quad[1] = Math.round(x * b + y * d + f); + quad[0] = Math.floor(x * a + y * c + e); + quad[1] = Math.floor(x * b + y * d + f); - quad[2] = Math.round(x * a + yh * c + e); - quad[3] = Math.round(x * b + yh * d + f); + quad[2] = Math.floor(x * a + yh * c + e); + quad[3] = Math.floor(x * b + yh * d + f); - quad[4] = Math.round(xw * a + yh * c + e); - quad[5] = Math.round(xw * b + yh * d + f); + quad[4] = Math.floor(xw * a + yh * c + e); + quad[5] = Math.floor(xw * b + yh * d + f); - quad[6] = Math.round(xw * a + y * c + e); - quad[7] = Math.round(xw * b + y * d + f); + quad[6] = Math.floor(xw * a + y * c + e); + quad[7] = Math.floor(xw * b + y * d + f); } else {