getAnimations method
Generates per-character 3D rotation and opacity dip at midpoint.
Implementation
@override
List<CharacterAnimation> getAnimations(double progress, int charCount) {
if (charCount == 0) return [];
return List.generate(charCount, (index) {
final staggered = staggeredProgress(progress, index, charCount);
final curved = applyCurve(staggered);
final wave = sin(curved * pi);
final angle = wave * pi * flipCount;
final opacity = 1.0 - (wave * wave);
if (axis) {
return CharacterAnimation(rotationY: angle, opacity: opacity.clamp(0.0, 1.0));
} else {
return CharacterAnimation(rotationX: angle, opacity: opacity.clamp(0.0, 1.0));
}
});
}