diff options
-rw-r--r-- | script.js | 2 | ||||
-rw-r--r-- | style.css | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -202,7 +202,7 @@ function tick() { // Use click to update velocities function updatev(event) { for (a of A) { - let d = ds(a, {x: event.clientX, y: event.clientY}) + let d = Math.max(ds(a, {x: event.clientX, y: event.clientY}), 100) a.vx += 100 * (a.x - event.clientX) / d a.vy += 100 * (a.y - event.clientY) / d } @@ -1,4 +1,5 @@ body { + position: fixed; overflow: hidden; touch-action: none; } |