Skip to content

Instantly share code, notes, and snippets.

@senapk
Last active August 17, 2023 13:26
Show Gist options
  • Save senapk/56dde818dc286de37eaae7bb5741b55c to your computer and use it in GitHub Desktop.
Save senapk/56dde818dc286de37eaae7bb5741b55c to your computer and use it in GitHub Desktop.
Meu projeto
// Fiz esse código enquanto dormia, por isso n
let raio = 50;
function setup() {
createCanvas(800, 500);
background("blue");
frameRate(10);
}
function draw() {
stroke("white");
stroke(0);
fill(255);
square(width / 2 - 50, height / 2 - 50, 100);
fill(random(255), random(255), random(255), 50);
circle(mouseX, mouseY, raio)
}
function mousePressed() {
raio = raio + 10;
}
function keyPressed() {
if (key == " ") {
background("blue");
}
if (key == "s") {
saveCanvas("sketch", "png");
}
}
@joaoeliaslv
Copy link

brabíssimo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment