Last active
August 17, 2023 13:26
-
-
Save senapk/56dde818dc286de37eaae7bb5741b55c to your computer and use it in GitHub Desktop.
Meu projeto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brabíssimo.