xxxxxxxxxx
27
// Sprinkles
// My very first Excersise in P5.js.
// By Bas Vogel (info@basvogel.nl)
function setup() {
let vWidth = windowWidth;
let vHeight = windowHeight;
createCanvas(vWidth, vHeight);
background(0);
}
function draw() {
let vWidth = windowWidth;
let vHeight = windowHeight;
background(0,18);
stroke(0);
for (let i = 0; i < 3; i++) {
let x = random(vWidth);
let y = random(vHeight);
let d = random(32);
let r = random(255);
let g = random(255);
let b = random(255);
fill(r,g,b);
ellipse(x,y,d);
}
}