效果图
代码和注释
主流程 main.pde
PFont font;
ArrayList<TextCircle> t = new ArrayList<TextCircle>(); ///< 存储圆环字符串
float MIN_RADIUS = 40; ///< 最小圆环半径, 30
String []STRS = {"牛轉乾坤", "大吉大利", "疫情退散", "否極泰來"};
void preload()
{
font = createFont("BZRZ.otf", 32);
}
void setup()
{
//size(540, 960);
size(640, 640);
preload();
textFont(font);
smooth(8);
t.add(new TextCircle(STRS[int(random(STRS.length))])); ///< 随机初始化字符串
}
void draw()
{
background(170, 91, 96);
fill(236, 219, 211, 255);
//background(0);
//fill(247, 244, 95);
/// @note 更新(半径)并显示字符串
for (int i = t.size() - 1; i >= 0; i--)
{
if (i =