Skip to content

More lottie fixes - #137

Merged
kunitoki merged 2 commits into
mainfrom
dev/lottie_improvements
Jul 13, 2026
Merged

More lottie fixes#137
kunitoki merged 2 commits 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 65.65657% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.35%. Comparing base (ceebb70) to head (4308706).
⚠️ Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
...nimation/renderer/yup_AnimationRenderResources.cpp 57.14% 18 Missing ⚠️
modules/yup_animation/io/yup_LottieReader.cpp 59.45% 15 Missing ⚠️
...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.35%   +0.02%     
==========================================
  Files         712      712              
  Lines       70398    70380      -18     
==========================================
+ Hits        55846    55849       +3     
+ Misses      14552    14531      -21     
Files with missing lines Coverage Δ
modules/yup_animation/animation/yup_Animation.cpp 100.00% <100.00%> (ø)
...ules/yup_animation/core/yup_AnimationTransform.cpp 75.22% <100.00%> (+1.69%) ⬆️
...odules/yup_animation/core/yup_AnimationTransform.h 100.00% <ø> (ø)
...s/yup_animation/io/yup_LottieExpressionEvaluator.h 88.88% <ø> (ø)
modules/yup_animation/io/yup_LottieWriter.cpp 73.58% <100.00%> (+0.05%) ⬆️
...les/yup_animation/model/yup_AnimationComposition.h 87.50% <ø> (ø)
..._animation/renderer/yup_AnimationRenderResources.h 66.66% <ø> (ø)
...s/yup_animation/renderer/yup_AnimationRenderer.cpp 70.52% <80.00%> (+0.15%) ⬆️
modules/yup_animation/io/yup_LottieReader.cpp 75.69% <59.45%> (+1.36%) ⬆️
...nimation/renderer/yup_AnimationRenderResources.cpp 46.90% <57.14%> (ø)

... and 3 files 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...4308706. 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.

@kunitoki
kunitoki merged commit 92dc597 into main Jul 13, 2026
41 checks passed
@kunitoki
kunitoki deleted the dev/lottie_improvements branch July 13, 2026 09:12
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