Hi there,
Not sure if this a bug or if I have done something silly, but I have a very simple sketch using a class which for some reason is not updating/looping…
Circle ball;
void setup() {
size (100,100);
background(255);
ball = new Circle();
}
void draw() {
pushMatrix();
translate (width/2,height/2);
ball = new Circle();
ball.display();
popMatrix();
}
class Circle { //<----------- Class
float d =10;
float grow = 1;
//constructor
Circle(){
}
void display() {
fill(255,0,0);
ellipse(0,0,d,d);
d= d + grow;
if (d < 0 || d > 60) {
grow = grow * -1;
}
}
}