initialize mouse position as undefined
This stops the particles from sticking at 0,0 on start.
This commit is contained in:
parent
d9b18cdb9e
commit
5b0d2d108a
@ -12,8 +12,8 @@ let particlesArray;
|
||||
|
||||
// get mouse position
|
||||
let mousePosition ={
|
||||
x: null,
|
||||
y: null,
|
||||
x: undefined,
|
||||
y: undefined,
|
||||
radius: (canvas.height / 80) * (canvas.width / 80)
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user