From 330790a6db6fb97181c3c508b34d78c5fe48121f Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 10 Apr 2020 11:31:31 -0600 Subject: [PATCH] remove colour settings, use CSS vars only --- js/ab-particles.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/ab-particles.js b/js/ab-particles.js index 45cc3d5..b3100dc 100644 --- a/js/ab-particles.js +++ b/js/ab-particles.js @@ -41,13 +41,12 @@ function particles(){ // create particle class class Particle{ - constructor(x, y, directionX, directionY, size, colour) { + constructor(x, y, directionX, directionY, size) { this.x = x; this.y = y; this.directionX = directionX; this.directionY = directionY; this.size = size; - this.colour = colour; } // method to draw individual particles draw(){ @@ -148,9 +147,8 @@ function particles(){ else{ 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)); } }