我想让方块随着鼠标移动转动但是运行不了是怎么回事求助谢谢
processing吧
全部回复
仅看楼主
level 1
熊猫雕塑 楼主
float d = 1;
float z = 0.0;
void setup(){
size(1000,800);
smooth();
noStroke();
rectMode(CENTER);
}
void draw(){
fill(0.5);
rect(width/2,height/2,width,height);
translate(mouseX,mouseY);
rotate(z);
z +=0.1;
d +=1.5;
scale(d);
if(d>200){
d = 1;
}
fill(255);
rect(0,0,1,1);
}
运行就不行我也不知道哪里出了问题
2018年04月27日 14点04分 1
level 1
熊猫雕塑 楼主
我检查了显示第一行错了这是什么情况
2018年04月27日 14点04分 2
level 1
熊猫雕塑 楼主
我不知道哪里出了问题
2018年04月27日 14点04分 3
level 2
把所有的标点符号改掉 我这里可以运行
2018年04月30日 09点04分 5
level 2
float d = 1.00;
float z = 0.0;
void setup(){
size(1000,800);
smooth();
noStroke();
rectMode(CENTER);
}
void draw(){
fill(0.5);
rect(width/2,height/2,width,height);
translate(mouseX,mouseY);
rotate(z);
z +=0.1;
d +=1.5;
scale(d);
if(d>200){
d = 1;
}
fill(255);
rect(0,0,1,1);
}
2018年04月30日 09点04分 6
回去试下大佬
2018年05月01日 16点05分
1