We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hey! how can i change the sketch size without recompile? i try to make a button but not work. I use void settings() cos i`ve more that one canvas. i trying to change the main canvas.
int choiceSize = 0;
void settings() {
//size(500, 500, P3D);
//fullScreen(P3D);
if (choiceSize==0) {
fullScreen(P3D, 2);
}
if (choiceSize==1) {
size(1000, 1000, P3D);
}
if (choiceSize==2) {
size(720, 1280, P3D);
}
}
Answers
Kf
thanks. I implement and it work, the window size change. but, the thing is that object and perspective arent display properlty . look that the perspective crash. ex: the ellipse is not perfect when i change the ratio.. how can i fix this?
Without seeing your code, I can only suggest this. I think you are using hard core values when defining the ellipse:
ellipse(0,0,50,50);
Try this
ellipse(0,0,int(width*0.05),int(height*0.05));
Does it solve your problem? Notice that translations should also keep in mind the screen size.
Kf