-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Core Animation rendering engineRegressions introduced by the Core Animation rendering engineRegressions introduced by the Core Animation rendering enginebug
Description
Hi everyone!
First of all, thanks for such a great library for dealing with animations.
I am sorry to say that I'm having an issue when using the latest version 4.3.3 (actually, it is also present on 4.3.0).
So, I have a few animation JSONs and have to control their progress with the SwiftUI.Slider view.
When using the .mainThread rendering engine everything is fine, but once I switch to the .coreAnimation I cannot reach the animation's latest "frame".
I would appreciate any help with this.
Which Version of Lottie are you using?
Lottie 4.3.3
.mainThread behavior
Screen.Recording.2023-10-12.at.10.02.06.mov
.coreAnimation behavior
Screen.Recording.2023-10-12.at.10.01.02.mov
Animation JSON
Code to reproduce the behavior
import Lottie
import SwiftUI
struct SwiftUIView: View {
@State
private var currentProgress: Double = .zero
let jsonURL = Bundle.main.url(
forResource: "animation",
withExtension: "json"
)
var body: some View {
if let jsonURL {
VStack {
LottieView {
await LottieAnimation.loadedFrom(url: jsonURL)
}
.configuration(.init(renderingEngine: .mainThread))
// .configuration(.init(renderingEngine: .coreAnimation))
.resizable()
.currentProgress(currentProgress)
Slider(value: $currentProgress, in: 0 ... 1.01)
}
}
}
}
#Preview {
SwiftUIView()
}Metadata
Metadata
Assignees
Labels
Core Animation rendering engineRegressions introduced by the Core Animation rendering engineRegressions introduced by the Core Animation rendering enginebug