xxxxxxxxxx
26
const w = 1500, h = 700
const col = [200, 20, 200]
const sz = 40
const points = [ ]
//const pointsCol = [20, 200, 130]
//let pointsCol = [20, 200, 130]
function setup() {
createCanvas(w, h);
}
function draw() {
background(20);
noStroke()
fill(col)
circle(mouseX, mouseY,sz)
points.forEach(pt => {
fill(pt.col)
circle(pt.x, pt.y, sz/2)
})
}
function mouseDragged(){
points.push({x:mouseX, y:mouseY, col:[random(255), random(255), random(255), 100]})
}