lottie-ios icon indicating copy to clipboard operation
lottie-ios copied to clipboard

Animation plays incorrectly after upgrading from 2.1.3 to 3.0.3

Open nrasband opened this issue 5 years ago • 7 comments

Hello, we have been using Lottie in our app for a long time and it has been working great. I updated from Lottie 2.1.3 to 3.0.3 and now one of our animations is playing incorrectly. There are fireworks that normally explode in all directions, but after updating, they just shoot straight up as vertical lines.

  • [x] The issue doesn't involve an Unsupported Feature
  • [x] This issue isn't related to another open issue

This issue is a:

  • [x] Non-Crashing Bug (Visual or otherwise)
  • [] Crashing Bug
  • [] Feature Request
  • [x] Regression (Something that once worked, but doesn't work anymore)

Which Version of Lottie are you using?

Lottie 3.0.3

What Platform are you on?

  • [] MacOS
  • [x] iOS

What Language are you in?

  • [x] Swift
  • [] Objective-C

Expected Behavior

The fireworks should shoot out from a center point like this: IMG_7557

Actual Behavior

The fireworks are now just straight lines that shoot towards the top of the screen like this: IMG_7547

Code Example

let animationView = AnimationView(name: "certified")
animationView.contentMode = .scaleAspectFill
animationView.backgroundColor = .red
animationView.frame = view.bounds
view.addSubview(animationView)

animationView.play(completion: { (_) in
    self.dismissAnimationView()
})

Animation JSON

Emailed

nrasband avatar Apr 02 '19 17:04 nrasband

@nrasband i have the same issue. after updating to new version, it's not loading some of the animations.

Probably not playing it or only with completion handler....

filsv avatar Apr 09 '19 16:04 filsv

Id be willing to be that animation uses repeaters. Repeaters arent supported yet by lottie 3.x.x

buba447 avatar Apr 09 '19 17:04 buba447

Id be willing to be that animation uses repeaters. Repeaters arent supported yet by lottie 3.x.x

It does use repeaters. It's strange that repeaters were supported in older versions of the framework, but not in 3.x.x. Any idea when repeaters will be implemented?

nrasband avatar Apr 09 '19 17:04 nrasband

In 2.x repeaters were only partially supported. The way they were implemented caused a lot of errors unfortunately. When I rewrote the library in swift I wanted to do repeaters the right way, so opted to lay the groundwork for a proper implementation of repeaters. This refactor made it impossible to use the old incorrect repeater solution.

I'm not sure yet when repeaters will be implemented in 3.x. They are on my todo, but I am maintaining this repo in my personal free time.

buba447 avatar Apr 09 '19 18:04 buba447

That makes sense. I guess in 2.x they were supported enough for our animation to work. We will stick with the older version in the meantime. This is the only issue we have ever had with it. Thanks for your work on this high quality library.

nrasband avatar Apr 09 '19 18:04 nrasband

I will be sure to update this issue when repeaters are added. Cheers!

buba447 avatar Apr 09 '19 18:04 buba447

Any updates on this @buba447?

popwarfour avatar Dec 07 '20 17:12 popwarfour