radiating rectangles

[p5js code canvas]
int w = 4, h = 4;
int points = 4;
float [] xArray = new float [points];
int constant = 1;
float angle = 4;
float scalar = 124;
float speed = .1;
float colorBG = 150;
float shade;

void setup() {
size(300, 300);
frameRate(120);
background(0);
}

void draw() {
//rotate(scalar/10);
float x2 = constant – sin(angle) * scalar;
float y2 = constant – cos(angle) * scalar;
angle = angle + speed;
speed = 1;
shade = (angle%100)*random(1, 3);
scalar -= 1;
scalar = scalar%300;
if (scalar <= – 300) {
scalar+=1;
}
if (scalar >= 300) {
scalar-=1;
}

for (int i = 0; i < points; i+=4) {
xArray[i] = i-(points/2);
//    noStroke();
stroke(255);
fill(shade, 100);
rect(width/2+xArray[i]+x2, height/2+y2, w*-scalar/16, h*-scalar/16);

}
//if (angle%700 >=600) {
//  fill(0, 10);
//  rect(0, 0, width, height);
//}
if (mousePressed) {
fill(0, 10);
rect(0, 0, width, height);
}
}
void keyPressed() {
fill(0, 10);
rect(0, 0, width, height);
}
[/p5js]