diff --git a/src/mouthAnimation.cpp b/src/mouthAnimation.cpp index 67c756b..eb8c541 100644 --- a/src/mouthAnimation.cpp +++ b/src/mouthAnimation.cpp @@ -41,10 +41,12 @@ Timeline animate(optional phone, centiseconds duration, centiseco }; auto bilabialStop = [&]() { - centiseconds closedDuration = clamp(previousPhoneDuration / 2, 4cs, 16cs); + centiseconds maxDuration = 12cs; + centiseconds leftOverlap = clamp(previousPhoneDuration / 2, 4cs, maxDuration); + centiseconds rightOverlap = min(duration, maxDuration - leftOverlap); return Timeline{ - { -closedDuration, 0cs, { A } }, - { 0cs, duration, {{ B, C, D, E, F }} } + { -leftOverlap, rightOverlap, { A } }, + { rightOverlap, duration, {{ B, C, D, E, F }} } }; };