PImage [] img =new PImage[3];
void setup(){
size(873,873);
img[0]=loadImage("snai101.png");
img[1]=loadImage("snai102.png");
img[2]=loadImage("snai103.png");
}
int I= 0;
void draw(){
background(img[I]);
if(frameCount%20==0) I=(I+1)%3;
}
=========================================================================================
void setup()
{
size(500,300);
}
void draw(){
background(#FFFFF2);
float x=(frameCount*5%1000);
if(x>500) x=1000-x;
for(int y=30;y<300;y+=50){
ellipse(x,y,30,30);
}
}
=========================================================================================
PImage img;
void setup(){
size(1920,1080);
img=loadImage("snai103.png");
imageMode(CENTER);
}
void photo(int x,int y){
pushMatrix();
translate(x,y);
rotate(radians(frameCount));
image(img,0,0);
popMatrix();
}
void draw(){
background(255);
photo(mouseX,mouseY);
photo(100,100);
photo(400,100);
photo(100,200);
photo(400,200);
}
=========================================================================================
沒有留言:
張貼留言