I’m all new to Processing, trying to learn the basics. Right now I’m trying to make a square expand for the center of a window. This works fine except for the first time running the loop. I am defining corner x and y as halves of width and height, which seems to work fine in the draw-function, but not outside. Am I way off?
Hi @harsande, If I’m not wrong, the height and the width are taken after the setup or something similar, if you initiates de variables in the setup() it works fine: