haloActor function
A glowing 1 px line just outside a character, flickering.
Implementation
void haloActor(
Painter p,
ActorDefinition? a,
int c,
double k, [
double t = 0.0,
]) {
if (a == null || k <= 0.02) return;
p.outlineShaded(
a.mask,
a.x,
a.y,
color: (_, _) => c,
alpha: (mx, my) => k * (0.75 + 0.45 * noise(my * 0.45 - t * 7.0, mx * 3)),
);
}