Code viewer for World: Tutorial 2.5 (clone by p b...

// Cloned by p birdwood on 10 Sep 2020 from World "Tutorial 2.5" by "Coding Train" project 
// Please leave this clone trail here.
 

/*
https://vimeo.com/channels/learningp5js/138327559 
*/
var spot = {
  x: 100,
  y: 50,
  d: 10
}

var col = {
  r: 255,
  g: 0,
  b: 0
}
function setup() {
  createCanvas(800, 800);
  background(0);
}

function draw() {
  col.r = random(100, 255);
  col.g = random(100, 190);
  col.b = random(100, 190);
  spot.d = random(1, 50);
  
  
  spot.x = random(0, width);
  spot.y = random(0, height);
  noStroke();
  fill(col.r, col.g, col.b, 10);
  box(spot.x, spot.y, 5,spot.d, spot.d);
}