Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RobinMoretti/305f60a037595a7ad3dde15303007e0e to your computer and use it in GitHub Desktop.
Save RobinMoretti/305f60a037595a7ad3dde15303007e0e to your computer and use it in GitHub Desktop.
Processing - circle with mouse position and fill color
int circleFillColor = 0;
void setup() {
// la taille du canvas (fenêtre)
size(500, 500);
}
void draw() {
// les couleurs varient entre 0 et 255
circleFillColor = circleFillColor + 1;
fill(circleFillColor);
circle(mouseX, mouseY, 50);
if (circleFillColor > 255) {
save("generatedImage.jpg");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment