xxxxxxxxxx
26
var dot = {
x:0,
y:0
};
var col = {
r:0,
g:0,
b:0
};
function setup() {
createCanvas(600, 400); //width, height
background(0);
}
function draw() {
dot.x = random(0,width); //width variable to get the canvas width
dot.y = random(0,height);
col.r = random(100,255);
col.b = random(100,190);
fill(col.r, col.g, col.b, 100); //Opacity 255 means 100% Opaque which is the default value, lesser the value more transparent is the color.
noStroke();
ellipse(dot.x, dot.y, 25, 25);
}