creative-coding/example_2/sketch.js
2025-04-02 10:54:03 +02:00

16 lines
318 B
JavaScript

function drawCanvasContent(){
createCanvas(windowWidth, windowHeight)
background(255)
for (let i = 0; i <= 50; i++) {
fill(0, 0, 0, 0)
square(random(width/2), random(height/2), random(width/8, width/2))
}
}
function setup() {
drawCanvasContent();
}
function mouseMoved() {
drawCanvasContent();
}