remove colour settings, use CSS vars only

This commit is contained in:
Asif Bacchus 2020-04-10 11:31:31 -06:00
parent fc13dc00bf
commit 330790a6db

View File

@ -41,13 +41,12 @@ function particles(){
// create particle class // create particle class
class Particle{ class Particle{
constructor(x, y, directionX, directionY, size, colour) { constructor(x, y, directionX, directionY, size) {
this.x = x; this.x = x;
this.y = y; this.y = y;
this.directionX = directionX; this.directionX = directionX;
this.directionY = directionY; this.directionY = directionY;
this.size = size; this.size = size;
this.colour = colour;
} }
// method to draw individual particles // method to draw individual particles
draw(){ draw(){
@ -148,9 +147,8 @@ function particles(){
else{ else{
directionY = (Math.random() * 5) - 2.5; directionY = (Math.random() * 5) - 2.5;
} }
let colour = '#8c5523';
particlesArray.push(new Particle(x, y, directionX, directionY, size, colour)); particlesArray.push(new Particle(x, y, directionX, directionY, size));
} }
} }