float eSize = 0; //オブジェクトのサイズ int x = 0; //オブジェクトのx座標 int y = 0; //オブジェクトのy座標 void setup() { size(400, 400); noStroke(); //線ナシ fill(0); //塗り黒 } void draw() { background(255); // 軌跡を残す場合は、下の3行をON、backgoundをOFFにする /* fill(255, 50); //透明度のあるrectを描画 rect(0, 0, width, height); fill(0); //オブジェクトは黒 */ eSize += (0.0 - eSize)*0.15; //円のサイズを減衰させながら小さくする。 ellipse(x, y, eSize, eSize); //円を描画する。 } void mousePressed(){ eSize = 1000; x = mouseX; y = mouseY; }