xxxxxxxxxx
26
function setup() {
createCanvas(400, 400);
}
let r = 0
let g = 0
let b = 0
let pick = 0
function draw() {
background(50);
pick = floor(mouseX/66)
console.log(pick)
//draw rectangles
strokeWeight(3)
rect(0,0,width/6,400)
rect(width/6*1,0,(width/6),400)
rect(width/6*2,0,(width/6),400)
rect(width/6*3,0,(width/6),400)
rect(width/6*4,0,(width/6),400)
rect(width/6*5,0,(width/6),400)
myFunction()
}
// var para = document.createElement("P"); // Create a <p> element
// para.innerHTML = "This is a paragraph."; // Insert text
// document.getElementById("myDIV").appendChild(para); // Append <p> to <div> with id="myDIV"