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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user