From ccc0b975a16acb458f2e44b39164ab70ace22721 Mon Sep 17 00:00:00 2001 From: Slobodan Date: Sat, 25 Apr 2026 00:44:35 +0200 Subject: [PATCH] Adjust Y coordinate flipping in w2c function Flip the Y coordinate in the w2c function for correct rendering. --- extensions/Four-channel-robotic-painting.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/Four-channel-robotic-painting.html b/extensions/Four-channel-robotic-painting.html index ceee2e5..d499bd7 100644 --- a/extensions/Four-channel-robotic-painting.html +++ b/extensions/Four-channel-robotic-painting.html @@ -1305,7 +1305,8 @@ // World → canvas function w2c(x, y) { - return [x * viz.scale + viz.ox, y * viz.scale + viz.oy]; + const flippedY = (viz.dataMaxY - y); // flip here + return [x * viz.scale + viz.ox, flippedY * viz.scale + viz.oy]; } function vizDraw() {