of static method
Implementation
static OrbStateSpec of(MorphOrbState state, MorphOrbVariant? variant) {
final chosen = variant ?? defaultVariant(state);
return switch (state) {
MorphOrbState.idle => OrbStateSpec(
kind: OrbGeometryKind.of(chosen!),
speedMul: 0.42,
wobMul: 0.38,
),
MorphOrbState.thinking ||
MorphOrbState.processing ||
MorphOrbState.generating => OrbStateSpec(
kind: OrbGeometryKind.of(chosen!),
),
MorphOrbState.success => const OrbStateSpec(kind: OrbGeometryKind.check),
MorphOrbState.error => const OrbStateSpec(kind: OrbGeometryKind.cross),
MorphOrbState.stopped => const OrbStateSpec(
kind: OrbGeometryKind.ring,
wobMul: 0,
scale: 0.86,
opacity: 0.55,
frozen: true,
),
};
}