void setup(){
size(600,600);
}
void draw(){
fill(255,255,255);
rect(100,100,100,100);
fill(255,255,0);
ellipse(mouseX,mouseY,100,100);
}
2.
void setup(){ size(600,600); //frameRate(1); } float x=100,y=100; void draw(){ background(0,0,0); PImage img; img=loadImage("1.png"); image(img,mouseX-150,mouseY-100); PImage img2; img2=loadImage("3.png"); image(img2 ,x ,y); x=x*0.9 + mouseX*0.1; y=y*0.9 + mouseY*0.1;
}
void setup(){
size(600,600);
//frameRate(1);
}
float [] a = new float[10];
float [] b = new float[10];
float x=100,y=100;
void draw(){
background(0,0,0);
a[9]=mouseX+100;
b[9]=mouseY+100;
for(int i=0;i<9;i++){
PImage img3;
img3= loadImage("4.png");
image (img3,a[i]=a[i+1]+mouseX*0.1,b[i]=b[i+1]+mouseY*0.1);
//a[i]=a[i+1]+mouseX*0.1;
//b[i]=b[i+1]+mouseY*0.1;
}
PImage img;
img=loadImage("1.png");
image(img,mouseX-150,mouseY-100);
PImage img2;
img2=loadImage("3.png");
image(img2 ,x ,y);
x=x*0.9 + mouseX*0.1;
y=y*0.9 + mouseY*0.1;
}
沒有留言:
張貼留言