We are trying to avoid excess use of anonymous class, and only allowed when the logic inside it is not much (for example, when adding simple InputListeners). Can you convert this in a class? You can keep it inside MeshHelper.