Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (19 sloc) 449 Bytes
void setup() {
size(960, 540);
pixelDensity(displayDensity());
background(255);
noStroke();
rectMode(CENTER);
}
/* draw関数には何も書かないが
mousePressed関数を機能させるために必要 */
void draw() {
}
void mousePressed() {
fill(random(255), random(255), random(255));
if (mouseButton == LEFT) {
ellipse(mouseX, mouseY, 40, 40);
} else if (mouseButton == RIGHT) {
rect(mouseX, mouseY, 40, 40);
}
}