airbnb / lottie-ios

An iOS library to natively render After Effects vector animations
http://airbnb.io/lottie/
Apache License 2.0
25.77k stars 3.75k forks source link

Unexpected Trim animation behaviour #1972

Closed KaneBuckthorpe closed 1 year ago

KaneBuckthorpe commented 1 year ago

We're experiencing some unexpected behaviour on this trim animation. It works and displays correctly on Android/Web. Any thoughts on what could be causing the different behaviour on iOS?

Which Version of Lottie are you using?

Lottie 4.0.1

Expected Behavior

https://user-images.githubusercontent.com/28348787/220927465-4171c78d-92ee-4f26-b3ce-eb29931e1687.mov

Actual Behavior

https://user-images.githubusercontent.com/28348787/220926680-74b2caaf-07ba-4909-8715-21abdda0ece5.MP4

Animation JSON

animation json

calda commented 1 year ago

Thanks for the report. This appears to be a bug with the Core Animation rendering engine / RenderingEngineOption.automatic support. We'll want to either update the Core Animation rendering engine to support this, or fix RenderingEngineOption.automatic so this animation falls back to the Main Thread rendering engine.

In the meantime, you can work around this issue by using RenderingEngineOption.mainThread instead of RenderingEngineOption.automatic for this animation, either by passing in a custom configuration to your LottieAnimationView or updating the global LottieConfiguration.shared.

Main Thread Core Animation
2023-03-03 16 18 58 2023-03-03 16 19 11