airbnb / lottie-ios

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

Lottie missing elements in Animation #2314

Open LaatonWalaBhoot opened 7 months ago

LaatonWalaBhoot commented 7 months ago

The JSON has elements missing while playing the animation. It works fine with Android Lottie.

Which Version of Lottie are you using?

Lottie 4.4.0

Expected Behavior

https://app.lottiefiles.com/share/b7da876e-c665-449b-a84b-a623f7016282

Actual Behavior

https://github.com/airbnb/lottie-ios/assets/30817376/5c2007ae-d0ef-4491-ae2a-2c31b033bcbe

Animation JSON

start_night.json

calda commented 7 months ago

This is some sort of bug with how the Core Animation rendering engine is laying out precomp layers and their children.

Here's a simplified version of the animation that has the same issue: issue_2414_simplified.json

LaatonWalaBhoot commented 7 months ago

@calda Any idea if this will be worked on. My motion designer is livid that it can't be used. Seems like an issue when base64 elements are present?

calda commented 7 months ago

As an immediate workaround you can configure your LottieView / LottieAnimationView to use the Main Thread rendering engine, which doesn't have this problem and supports your animation as expected.

I think the issue with the animation is related to how the layer pre-compositions are very large (like 100000 px wide). If the precomp layers were a more reasonable size I think this issue wouldn't happen, but I'm not certain.