xxxxxxxxxx
let j = 1
let k = 1
let maxOpacity = 50
let maxRadius = 25
function setup(){
createCanvas(windowWidth, windowHeight)
background(255)
noStroke()
}
function draw(){
// fill(0)
// ellipse(mouseX,mouseY,5,5)
pen(mouseX,mouseY,j,k)
j+= 10
k+= 0.1
if (j > maxRadius){
j = 1
maxRadius = random(5,100)
}
if (k > maxOpacity){
k = 1
}
}
function pen(x,y,r,a){
fill(0,a)
ellipse(mouseX,mouseY,r,r)
}
function mousePressed(){
background(255)
}