Compare commits

..

2 Commits

Author SHA1 Message Date
010520f722 can't trap dots in corner anymore 2026-01-21 17:42:29 +01:00
66a8bacbe8 mobile jumping background fix 2026-01-21 17:30:40 +01:00
2 changed files with 8 additions and 0 deletions

View File

@@ -6,4 +6,6 @@ canvas {
width: 100vw;
height: 100vh;
width: 100lvw;
height: 100lvh;
}

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)