airbnb / lottie-android

Render After Effects animations natively on Android and iOS, Web, and React Native
http://airbnb.io/lottie/
Apache License 2.0
34.95k stars 5.4k forks source link

Allow bounce easings along a path to return a position outside of the path #2457

Closed idlewan closed 7 months ago

idlewan commented 7 months ago

Don't clamp interpolated distance along path to 'progress' value between 0 and 1.

Bounce in / Bounce out easings can transform the progress to negative values or values higher than 1. getPosTan unfortunately clamps the input to be between 0 and 1, so we need to handle the t < 0 and t > 1 cases separately.

This is for the same issue I helped fix in the flutter library as well here: https://github.com/xvrh/lottie-flutter/pull/330

Expected result (both bounce-in and bounce out) along linear and curved paths:

https://github.com/airbnb/lottie-android/assets/632735/6a25e139-fc81-4c3b-b3f3-be118c56db06

github-actions[bot] commented 7 months ago

Snapshot Tests API 23: Report Diff API 31: Report Diff