let c = 0;
let linecolor = 0;

function setup() {

  createCanvas(windowWidth, windowHeight);
  angleMode(DEGREES);
  background(0);
  lineColor =random(0,255);
  
}

function draw() {
  fill(0, 10);
  rect(0, 0, width, height);// draw a rect = with and height of the canvas to see the line always move//
  c = c + 5;

  translate(width / 2, height / 2);
  rotate(c);
  line(-100, -100, 100, 100);
  stroke(lineColor);
  if (mouseIsPressed) {
		lineColor = color(random(0,255), random(0,255), random(0,255));
  }

}