change particles variable to avoid confusion
This commit is contained in:
parent
ba23f94eed
commit
e345b58555
@ -115,7 +115,7 @@ function particles(){
|
|||||||
function init(){
|
function init(){
|
||||||
particlesArray = [];
|
particlesArray = [];
|
||||||
let numberOfParticles = (canvas.height * canvas.width) / 9000;
|
let numberOfParticles = (canvas.height * canvas.width) / 9000;
|
||||||
for (let i = 0; i < numberOfParticles * particles; i++){
|
for (let i = 0; i < numberOfParticles * numParticles; i++){
|
||||||
let size = (Math.random() * sizeMultiplier) + 1;
|
let size = (Math.random() * sizeMultiplier) + 1;
|
||||||
let x = (Math.random() * ((innerWidth - size * 2) - (size * 2)) + size * 2);
|
let x = (Math.random() * ((innerWidth - size * 2) - (size * 2)) + size * 2);
|
||||||
let y = (Math.random() * ((innerHeight - size * 2) - (size * 2)) + size * 2);
|
let y = (Math.random() * ((innerHeight - size * 2) - (size * 2)) + size * 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user