Lottie Animation stops working after simple edit
I’m working on a lottie animation which gets triggered and scrubbed through with scroll trigger. At first I simply uploaded an SVG and applied one of the basic animation templates (slide up). This worked fine, but it needed significant adjustment to look good.
After several hours of moving keyframes, I uploaded the new version of the lottie JSON file (optimized version) and this new version did not work. The animation would not trigger as the page scrolled. Nothing even appeared (only the DOM parent SVG element). I know the file was loading correctly because the SVG parent object appeared in the DOM and I know lottie was loading correctly because other animations on the same page (created the exact same way) were still working.
After several more hours of troubleshooting, I discovered the single step I made that seems to break the lottie animation. That step was removing the opacity property from the animation timeline for an object (because they’re no longer needed).
I have no idea why or how this breaks the file, but it does. If I delete even a single one of these keyframes (it’s a very basic animation going from 0% to 100% opacity, applied by the default animation chosen at the creation of the lottie file), then the animation breaks and won’t play on the web page. I don’t need these opacity keyframes any more because the element is going to translate into view. The opacity keyframes are unecessary, but removing them breaks the whole file (not just the element, the whole file stops working).
I have a few questions:
1. Why is this happening? How can removing an animation from an element cause the animation to entirely break?
2. Why is there no message telling me that the file will no longer play in Airbnb/lottie-web-player scenarios (It will appear perfectly fine in the preview window and in the dashboard)
3. How can I possibly tell what is going to break the animation (in an earlier forum post I made, the issue ended up being the presence of blending modes being used in the SVG, a feature which breaks the animation for anything other then the “ThorVG” player). Also no alert for that.
4. Is there some other way to create these animations (without using After Effects) that does not have these myriad and obscure pitfalls.
Until I have a sufficient answer to this issue, I’m forced to make 1 or two changes at a time and export a new version each time to test whether the animation broke or not, which I’m sure I don’t need to say is incredibly annoying and tedious.
Thanks!