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

Animation doesn't finish completely/last few frames are missing #212

Closed Cellane closed 7 years ago

Cellane commented 7 years ago

I'm trying to integrate Lottie into my project with a Bodymovin JSON file I got from our designer and while the animation starts as expected, it doesn't actually ever reach its final state – to my unexperienced eye, it looks like last 3-5 frames are missing and I'm not entirely sure why. When I check the demo HTML file Bodymovin generated, the animation plays and loops just fine which leads me to believe that the export went through just fine and the issue might be on Lottie's side.

I understand Lottie doesn't support the entirety of After Effects features but I'm also not sure how I could verify that an unsupported feature was found in the JSON file (and our designer swears he didn't use anything from the list mentioned in README file). When I tried to include the JSON file into the Lottie's example app, the same behaviour (animation not finishing) happened. Furthermore, it seemed that the animation was just… stuck for the last ~10% of its duration.

Attached below in the ZIP archive is the original After Effects file, exported JSON file and the demo HTML file from Bodymovin as well. I'd be very grateful if someone more experienced could help me determine where the issue lies and if there's an easy way to solve this on my side or whether it's something that has to be improved in Lottie first.

filter-to-x-button.zip

Willjay90 commented 7 years ago

Same here. I downloaded progree-success from Lottiesfile.com. However, when I do animation in my project, it just missing the last part of the animation.

alaraKalama commented 7 years ago

If your designer makes the rotation and position transformation directly on the rectangle shape transform properties (instead of the shape layer transform) it should work fine. I am uploading the changed project.

filter-to-x-button.zip

Cellane commented 7 years ago

Thank you so much for your assistance! I'll pass the message back to our designers but unfortunately due to time constraints, I had to settle for different method – simple and stupid UIImageView's animationImages.

kdawgwilk commented 7 years ago

The JSON in the changed project above is exactly the same as the version uploaded but the issue creator. I am guessing the changed file is the only the aftereffects project.

buba447 commented 7 years ago

Should be fixed in Lottie 2.0! If you still have a problem please create a new issue!