Skip to content

Commit

Permalink
nearly compleate
Browse files Browse the repository at this point in the history
  • Loading branch information
black committed Dec 11, 2023
1 parent 34b8c74 commit 318f15b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ window.onload = () => {

setInterval(() => {
const speed = 10;
if (mouse.x < canvas.width) {

if (mouse.x > canvas.width || Math.abs(mouse.x) < 1) {
mouse.x += speed;
} else {
mouse.x = -mouse.x;
}

if (mouse.y < canvas.height) {
Expand Down

0 comments on commit 318f15b

Please sign in to comment.