can't trap dots in corner anymore
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user