Random stuff 2

Link here.

var col = {
  r: 255,
  g: 0,
  b: 120
}

var points = {
  x: 0,
  y: 0
}

var col = {
  r: 255,
  g: 0,
  b: 120
}



function setup() {
  createCanvas(windowWidth, windowHeight);
  background(255, 255, 255)
  background(0)
}

function draw() {
  //background(0);
  points.x = random(0, width/2)
  points.y = random(0, height)
  col.r = random(0, 50)
  col.g = random(50, 200)
  col.b = random(200, 255)
  fill(col.r, col.g, col.b, 100)
  noStroke()
  ellipse(points.x, points.y, 30, 30)
  //rectMode(CENTER)
  //rect(points.x, points.y, 50, 50)
  points.x = random(width/2, width)
  points.y = random(0, height)
  col.r = random(250, 255)
  col.g = random(0, 250)
  col.b = random(0, 255)
  fill(col.r, col.g, col.b, 75)
  rect(points.x, points.y, 30, 30)
}

function windowResized() {
  resizeCanvas(windowWidth, windowHeight);
}




Leave a Reply