Continuing to practice p5.js

JavaScript
let dot = {
  x: 100,
  y: 50
}

let col = {
  r: 237,
  g: 34,
  b: 93
} 

function setup() {
  createCanvas(650, 400);
  background(250)
}

function draw() {
  noStroke();
  dot.x = random(0, width);
  dot.y = random(0, height)
  fill(col.r, col.g, col.b, 20);
  ellipse(dot.x, dot.y, 24, 24);
}

Posted

in