initialize mouse position as undefined

This stops the particles from sticking at 0,0 on start.
This commit is contained in:
Asif Bacchus 2020-04-08 04:35:04 -06:00
parent d9b18cdb9e
commit 5b0d2d108a

View File

@ -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)
}; };