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() {