Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animations presented badly on 3.4.0 #1664

Closed
RoyMChen opened this issue Jul 26, 2022 · 3 comments · Fixed by #1684
Closed

Animations presented badly on 3.4.0 #1664

RoyMChen opened this issue Jul 26, 2022 · 3 comments · Fixed by #1684
Labels

Comments

@RoyMChen
Copy link

Which Version of Lottie are you using?

Expected Behavior - recorded in Lottie 3.3.0
Actual Behavior - recorded in Lottie 3.4.0

Expected Behavior

WhatsApp.Video.2022-07-26.at.13.56.34.mp4
WhatsApp.Video.2022-07-26.at.13.56.34.1.mp4

Actual Behavior

WhatsApp.Video.2022-07-26.at.13.47.12.mp4
WhatsApp.Video.2022-07-26.at.13.47.12.1.mp4

Animation JSON

Archive.zip

@calda
Copy link
Member

calda commented Jul 26, 2022

What rendering engine option are you using? Are you setting custom value providers to customize the colors of the animation? Could you share the source code for this, or ideally a sample project that reproduces the issue if possible?

When I look at the animation json files you shared on lottiefiles.com and compare them to what I see in the sample iOS app, the animation looks identical as far as I can tell.

image

@RoyMChen
Copy link
Author

I used mainThread as the render engine option.
This is the source code for the first animation (the second one has the same logic):

    let animation = Animation.named("AR_Onboarding_Radar")
    self.animationView.animation = animation
    self.animationView.contentMode = .scaleAspectFit
    self.animationView.loopMode = .loop
    self.animationView.backgroundBehavior = .pauseAndRestore
    let color = UIColor.black **
    let colorValue = ColorValueProvider(color.lottieColorValue)
    let keypath = AnimationKeypath(keypath: "**.base_color.**.Color")
    self.animationView.setValueProvider(colorValue, keypath: keypath)
    self.animationView.play()

** here I use dynamic color for light/ dark mode (other than UIColor.black)

@calda
Copy link
Member

calda commented Jul 31, 2022

It looks like this is the same issue as #1683, and is fixed by #1684. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants