From 9410d3a7c6ff550d9cea1fdd59bac71bc8df3d52 Mon Sep 17 00:00:00 2001 From: Jose Henrique Date: Fri, 10 Jul 2026 11:08:15 -0300 Subject: [PATCH] fixing again --- js/matrix.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/matrix.js b/js/matrix.js index 8d8c727..c70f0ad 100644 --- a/js/matrix.js +++ b/js/matrix.js @@ -171,11 +171,11 @@ class MatrixBackground { // Reflect at the canvas edge. Keep the base velocity in sync with // the bounce so the drift easing does not push the dot back into // the same wall on the next frames. - const radius = dot.size / 2; - const minX = radius; - const minY = radius; - const maxX = Math.max(minX, this.canvas.width - radius); - const maxY = Math.max(minY, this.canvas.height - radius); + const dotRadius = dot.size / 2; + const minX = dotRadius; + const minY = dotRadius; + const maxX = Math.max(minX, this.canvas.width - dotRadius); + const maxY = Math.max(minY, this.canvas.height - dotRadius); if (dot.x <= minX && dot.vx < 0) { dot.x = minX + (minX - dot.x);