diff --git a/js/particles.js b/js/particles.js index f94095a..806598c 100644 --- a/js/particles.js +++ b/js/particles.js @@ -138,7 +138,7 @@ function particles(){ canvasContext.globalAlpha = opacityValue; canvasContext.strokeStyle = strokeColour; } - canvasContext.lineWidth = 1; + canvasContext.lineWidth = width; canvasContext.beginPath(); canvasContext.moveTo(particlesArray[a].x, particlesArray[a].y); canvasContext.lineTo(particlesArray[b].x, particlesArray[b].y); @@ -201,6 +201,17 @@ function particles(){ console.log("'sizeMultiplier' must be a finite number. Using default of '5'."); }; + if (typeof width == 'undefined'){ + width = 1; + } + else if (Number.isInteger(width) && width > 0){ + width; + } + else{ + width = 1; + console.log("'width' must be an integer number of pixels greater than 0. Using default of '1'."); + }; + if (typeof connections == 'undefined'){ connections = true; }