> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://p5js.sketchpad.cc/sp/pad/view/ro.UYF5ngo8zwD/rev.108
 * 
 * authors: 
 *   Nicholas Kiray

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



var cs = 20;
var xoff = 0;
var grow = 0;
var growList = [cs];

function setup() {
  createCanvas(500,500);
  background('#FFFFFF');
  for (var i = 0; i < 50; i++) {
    growList[i] = random(0, 1);
    print(growList[i]);

  }
}

function draw() {
  background('#363448');
  fill(255);


  xoff += 0.015;

  noFill();

  for (var x = cs; x < width; x += width / cs) {
    for (var y = cs; y < height; y += height / cs) {
      grow = map(sin(xoff), 0, 1, 2, 3.5);
      if (dist(mouseX,mouseY,x,y) <= cs/2){
          fill(255);
          } else{
      stroke(x / 2, y / 2, 200);
      }
      ellipse(x, y, cs * grow, cs * grow);
    }
  }
}