Add progressive deceleration to shake emotion and new shy asset

Implements a progressive deceleration phase for the shake emotion using a cubic ease-out, replacing the previous abrupt stop logic. Adds the shy.json animation asset for the 'shy' emotion. Updates lottie_player to properly delete existing blink timers before scheduling a new one. Also includes minor header and enum adjustments for shake_emotion.
This commit is contained in:
2026-01-25 16:12:11 +05:30
parent 5b8beca22f
commit 90031cd16e
5 changed files with 56 additions and 37 deletions

View File

@@ -1388,6 +1388,12 @@ static void scheduleNextBlink(lottie_player_handle_t handle) {
return;
}
// Delete existing timer if it exists
if (handle->blinkTimer) {
lv_timer_del(handle->blinkTimer);
handle->blinkTimer = NULL;
}
uint32_t delayMs =
LOTTIE_BLINK_MIN_MS +
(esp_random() % (LOTTIE_BLINK_MAX_MS - LOTTIE_BLINK_MIN_MS));