//curveVertex参考ページ→http://www-im.dwc.doshisha.ac.jp/~ariga/ProcessingWeb/PFuncVertex.html PFont myFont; PImage haikeisummer; PImage girlkutiaki; PImage girlkutitoji; PImage senpuki; PImage kaze; PImage kumo; float x,y,p,q,theta; int show=0; void setup(){ size(500,500); haikeisummer = loadImage("haikeisummer.png");//和室 girlkutiaki = loadImage("girl-kuti-aki.png");//口あき girlkutitoji = loadImage("girl-kuti-toji.png");//口とじ senpuki = loadImage("senp-uki.png");//扇風機 kaze = loadImage("kaze.PNG");//風 kumo = loadImage("kumo.PNG");//雲 frameRate(200); myFont = createFont("MS Gothc",48); textFont(myFont); } void draw(){ background(180,240,255);//空 if (q>350) q=40; q+= 0.1; image(kumo,q,150,70,60);//雲 image(kumo,q+50,200,50,40);//雲 image(haikeisummer,0,0,500,500);//和室 image(senpuki,0,200,200,280);//扇風機 image(girlkutitoji,220,200,200,280);//口とじ if(show==1){ image(girlkutiaki,220,200,200,280);//口あき image(kaze,140,220,100,130);//風 stroke(150,100,50); fill(150,100,50); strokeWeight(1); x=460; y=330; y=270+30*sin(theta*PI/180); theta++; beginShape(); curveVertex(x, y); curveVertex(x, y); curveVertex(440, y+5); curveVertex(390, 250);//3 curveVertex(360, 250);//2 curveVertex(360, 260);//最も中央寄りー上 curveVertex(360, 270);//最も中央寄りー下 //curveVertex(360, 270);//2 curveVertex(385, 280);//3 curveVertex(440, y+10); //curveVertex(x-60, y+70); curveVertex(x, y); curveVertex(x, y); endShape(); if (p>550) p=-40; textSize(20);//もじ p++;//もじ fill(255,80,80);//もじ textAlign(CENTER);//もじ text("あああああ",p,400);//もじ }else{ stroke(150,100,50); fill(150,100,50); strokeWeight(1); x=460; y=300; beginShape(); curveVertex(x, y); curveVertex(x, y); curveVertex(440, y+5); curveVertex(390, 250);//3 curveVertex(360, 250);//2 curveVertex(360, 260);//最も中央寄りー上 curveVertex(360, 270);//最も中央寄りー下 //curveVertex(360, 270);//2 curveVertex(385, 280);//3 curveVertex(440, y+10); //curveVertex(x-60, y+70); curveVertex(x, y); curveVertex(x, y); endShape(); } textAlign(CENTER); textSize(18); fill(0,0,0); text("↑Cick here.",155,470); } void mousePressed(){ if(100