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
|
// get mouse position
|
||||||
let mousePosition ={
|
let mousePosition ={
|
||||||
x: null,
|
x: undefined,
|
||||||
y: null,
|
y: undefined,
|
||||||
radius: (canvas.height / 80) * (canvas.width / 80)
|
radius: (canvas.height / 80) * (canvas.width / 80)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user