can't trap dots in corner anymore

This commit is contained in:
2026-01-21 17:42:29 +01:00
parent 66a8bacbe8
commit 010520f722

View File

@@ -119,6 +119,12 @@ export class DotBackground implements OnDestroy {
if (speed > 0.3) {
dot.vx *= 0.98;
dot.vy *= 0.98;
} else if (speed <= 0.3) {
dot.vx *= 1.02;
dot.vy *= 1.02;
} else if (speed === 0) {
dot.vx = Math.random() * 0.2 - 0.1;
dot.vy = Math.random() * 0.2 - 0.1;
}
// Bounce off edges (accounting for radius)