newInstance() method

Hello and welcome to the forum!

Great to have you here!

That’s how I’d do it.

Read more here: https://www.processing.org/tutorials/objects/

Warm regards,

Chrisir

Test t; 

void setup() {
  size(600, 600);
  t = new Test();
}

void draw() {
  //
}

// ===============================================================

class Test {
  //
  Test() {
  }
  //
}//class