Skip to content

More lottie fixes#137

Open
kunitoki wants to merge 1 commit into
mainfrom
dev/lottie_improvements
Open

More lottie fixes#137
kunitoki wants to merge 1 commit into
mainfrom
dev/lottie_improvements

Conversation

@kunitoki

@kunitoki kunitoki commented Jul 11, 2026

Copy link
Copy Markdown
Owner

This pull request adds support for the "Auto-Orient" feature in Lottie animation layers, ensuring that layers can align their local X axis with their instantaneous motion path, as specified by the Lottie "ao" property. The implementation includes updates to the animation transform logic, Lottie file parsing and serialization, and comprehensive tests to verify correct behavior and roundtrip preservation.

Auto-Orient Feature Implementation

  • Added an autoOrient property to the AnimationTransform class, and updated the toAffineTransform method to rotate the layer according to its motion path when autoOrient is enabled. [1] [2]
  • Updated the Lottie reader and writer to correctly parse and serialize the "ao" (auto-orient) property for each layer, ensuring that this setting is preserved when reading and writing Lottie files. [1] [2]

Renderer Logic Improvements

  • Improved group rendering logic to better handle nested groups and their paint/geometry relationships, specifically by detecting direct paint children and adjusting geometry feeding behavior accordingly. [1] [2]

Testing Enhancements

  • Added new tests to verify that auto-orient is correctly parsed from Lottie data, that the affine transform aligns with the motion path when enabled, and that roundtripping through the writer preserves the property. [1] [2] [3]

Test Data

  • Added a new bell.json Lottie file to the test data for validating solid color and auto-orient parsing.

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.32%. Comparing base (ceebb70) to head (d2386e8).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...s/yup_animation/renderer/yup_AnimationRenderer.cpp 80.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #137      +/-   ##
==========================================
- Coverage   79.32%   79.32%   -0.01%     
==========================================
  Files         712      712              
  Lines       70398    70411      +13     
==========================================
+ Hits        55846    55853       +7     
- Misses      14552    14558       +6     
Files with missing lines Coverage Δ
...ules/yup_animation/core/yup_AnimationTransform.cpp 75.22% <100.00%> (+1.69%) ⬆️
...odules/yup_animation/core/yup_AnimationTransform.h 100.00% <ø> (ø)
modules/yup_animation/io/yup_LottieReader.cpp 74.44% <100.00%> (+0.11%) ⬆️
modules/yup_animation/io/yup_LottieWriter.cpp 73.58% <100.00%> (+0.05%) ⬆️
...s/yup_animation/renderer/yup_AnimationRenderer.cpp 70.52% <80.00%> (+0.15%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ceebb70...d2386e8. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant