Lottie Windows Versions Save

Lottie-Windows is a library (and related tools) for rendering Lottie animations on Windows 10 and Windows 11.

v8.0.280224.1

1 month ago

Changes:

  • #551: Fix codegen to generate IAnimatedVisual2 and IAnimatedVisualSource2 interfaces for WinUI3
  • #550: Added quickstart to readme, fixed build status section
  • #549: Unify the code for cs codegen between IDynamicAVS and regular IAVS
  • #548: Fixed call to Properties field when field optimization is disabled
  • #533: Fix wrong variable name with GenerateDependencyObject parameter
  • #547: Fixed cppcx generator when GenerateDependencyObject option enabled
  • #546: Fixed AssemblyFileVersion attribute
  • #545: Fixed assembly version
  • #544: Fix cppcx generator output
  • #543: Fixed const var controller issue in generated code
See More
  • #542: Fixed use after free bug in generated code
  • #530: Updated Cake build system to newer version, and updated source to net7.0.
  • #529: [LottieGen] Added noexcept modifiers for cppwinrt
  • #488: [LottieGen] Added new AnimationController API support for LottieGen
  • #527: Added dev trigger
  • #524: Fixed IAnimatedVisual impl line for WinUI 2.8 (+fixed 2.7 -> 2.8)
  • #517: Fixed signing
  • #520: Fixed codegen to produce correct WinUI3 code
  • #519: Use base64 string instead of array of bytes for CSharp code gen.
  • #518: Fixed duration property getter
  • #516: Reduce warnings noise and provide more info on some unexpected field warnings
  • #509: Fixed bezier curve IsLinear check
  • #494: Fixed previous progress with linear cubic bezier
  • #508: Fixed properties call codegen
  • #507: [LottieGen] Refactored effects, added cache for factories
  • #506: Pixel view refactoring
  • #504: Refactoring
  • #501: Fixed nuget build
  • #500: Namespace migration and WinUI3 package MicrosoftToolkit.WinUI.Lottie
  • #497: Fixed gradient brush offset for rectangle geometry
  • #495: [LottieGen] Added workaround to make path animations playable even with different number of segments in keyframes

This list of changes was auto generated.

v7.1.1

1 year ago

Changes:

  • #492: Fixed visibility property for visuals with shadow
  • #489: ShapeLayerTranslator fix
  • #477: [LottieGen] Added IAnimatedVisual2 implementation preview.
  • #486: Sync some files to the new branch name
  • #485: Version bump to 7.1.0 in main branch
  • #483: [LottieGen] Fixed layer combining for Exclude mode
  • #484: Master branch was renamed to main, update azure-pipelines config
  • #481: Fixed typos in settings.xamlstyler
  • #479: Fixed ComposeMatteLayers method to work for invisible layers
  • #480: [LottieGen] Fixed UAP version check for Drop Shadow effect
See More
  • #475: [LottieViewer] PixelView bug fixed. We should not update pixel view when it is not on the screen.
  • #474: [LottieGen] New optimizer that collapses PreComp layers if they reference the same RefId for AnimatedIcon

This list of changes was auto generated.

v7.1.0

2 years ago
  • Lottie-Windows version 7.1.0 release has been focused on performance. We introduced new optimizations and improved old ones.
    • LottieGen now by default will try to collapse and merge some parts of the animation to improve performance and reduce size, to disable it you can use -DisableLottieMergeOptimization argument.
  • Lottie-Windows now supports shadow and blur effects for PreComp and Shape layers.
  • Gradient fill for rectangles fixed.
  • LottieViewer got new feature PixelView that allows you to examine animation pixel-by-pixel on different resolutions.
  • Other minor changes and fixes.

v7.0.5

2 years ago

This release contains major LottieGen optimizer changes. For animations that have many states (or top-level PreComp layers) Lottie-Windows now will generate about 40-50% more simpler visual trees.

Now Lottie-Windows also supports Round Corners effect and blur/shadow effects are now supported for Shape layers.

Changes:

  • #456: [Lottie Viewer] Added scale slider. Added repeating pattern background and checkbox for hiding/showing solid color bg.
  • #455: Added effects (blur/shadow) support for shape layers.
  • #454: Enabled shadow effect for PreComp layers
  • #453: Added Lottie Merge Optimization
  • #452: Added support for animated round corners modifier
  • #451: Add support for round corners if there is no animations
  • #450: Gradient fill for rectangle(rounded rectangle) shape fixed

This list of changes was auto generated.

v7.0.3

2 years ago

Changes:

  • #449: Fixed mismatch of nullable types
  • #444: Fixes for MSBuild task
  • #437: Update Lottie to use 5.0.1 of System.Text.Encodings.Web

This list of changes was auto generated.

v7.0.2

2 years ago

Changes:

  • #437: Update Lottie to use 5.0.1 of System.Text.Encodings.Web

This list of changes was auto generated.

v7.0.1

3 years ago

Changes:

  • #434: Fix for security issue in System.Text.Encodings.Web v4.7.1.

This list of changes was auto generated.

v7.0.0

3 years ago

Lottie-Windows version 7.0 release notes

Along with the usual slew of bug fixes and more support of After Effects features, the Lottie-Windows version 7.0 release has been focused on making Lottie more compelling for use within Windows UI features. Lottie-Windows is now an important part of the new WinUI AnimatedIcon story that will allow animations in many places where static glyphs were previously used.

Lottie-Windows is unique in its ability to translate Lottie files into code that takes advantage of Windows’ awesome compositor and animation engine. This allows Lottie to be used in places that could never afford the runtime overhead of a regular Lottie player.

Here are some highlights to that end:

Color binding

The integration of Lottie into UI features mandates the ability to do color binding. Color binding is where certain parts of the Lottie are tied to system theme colors (for example the user’s foreground or accent colors). Lottie-Windows now supports 2 types of color binding: explicit, and automatic.

Explicit color binding allows the designer to annotate their After Effects project to indicate which parts require binding. This is done with a CSS-like syntax added to the comments on the After Effects elements. For example, to indicate that a fill should be bound to the Foreground color, the designer simply needs to add this annotation to the fill: “{color:var(Foreground);}”. This will cause a property called “Foreground” to be added to the generated code which the user can then set. AnimatedIcon uses this facility to automatically bind system colors to animated icons.

Automatic color binding handles the case where you don’t have access to the After Effect project. With automatic color binding, a property for each unique color will be added to the generated code allowing you to modify each color at runtime.

Note that color bindings in other Lottie systems rely on runtime modification of JSON or handling per-frame callbacks. Such techniques are at odds with Lottie-Windows’ focus on runtime performance.

First class support for C++/WinRT

LottieGen has always supported code generation for C# and C++/CX, with only limited support for C++/WinRT. With version 7.0 C++/WinRT has become a first class citizen, and supports all of the features of the other languages.

MsBuild Task for LottieGen

Ever wanted to just drop a Lottie file into your Visual Studio project and have LottieGen automatically turn it into high performance generated code that you can reference directly in your XAML? With the MsBuild Task available via NuGet we’ve gotten closer to that dream. LottieGen.MsBuild packages the LottieGen tool into an MsBuild Task that can be called from your MsBuild project and targets files.

We still need to write a .targets file that will make this completely automatic. If you start writing your own, please consider sharing it!

By the way, in order to enable LottieGen to be packaged in this way, we’ve started building LottieGen as a standalone .exe. If you find that convenient (i.e. if you don’t want to depend on .NET 5 being installed), you can grab the .exe out of the NuGet package for use in your development workflow.

Lottie features and compatibility

As ever, we’ve improved compatibility and added more missing Lottie features. Compatibility is something that all Lottie players aspire to, but the reality for Lottie is that it can never be 100% due to the open-ended nature of the After Effects object model and the lack of standardization of the Lottie format. Compatibility will be an ongoing effort, so if something doesn’t work quite right, please give us feedback on Github so we can prioritize your case.

For this release, more things should work better, and we’ve started to add support for layer effects. We’ve added support for Gaussian Blur effects so far, and the infrastructure to support more effect types.

Here’s a summary of what’s new in 7.0:

General:

  • Explicit color binding via After Effects comments.
  • Automatic color binding.
  • Gaussian blur layer effects.
  • Ability to load JSON from any stream, including memory.
  • Support for LottieFiles.com’s "dotLottie" zip format.
  • Simplified loading of images so in most cases any asynchrony is hidden.
  • ImageAssetDelegate to allow users to control image loading.
  • Code updated to take advantage of C# 8.

LottieViewer

  • Display markers on the scrubber timeline.
  • List markers in the info panel, with hyperlinks to jump to each marker.
  • Show frame numbers instead of progress or time (scrubber tooltip, markers).
  • Keyboard arrow keys move the scrubber by one frame at a time.
  • Ability to modify Lottie colors to see the effect of color binding.
  • Show UAP and LottieViewer versions in the info panel.
  • Lottie in LottieViewer: play/stop button is animated with Lottie.

LottieGen

  • First class support for cppwinrt code generation.
  • Updated to use .NET 5.
  • Enabled C# nullable types.
  • New build output: single file standalone exe for use in build systems.
  • LottieGen now available via Nuget as an MsBuild Task (LottieGen.MsBuild).
  • Add access to markers, frame rate, and other metadata in generated code.
  • Add ability to specify additional interfaces on generated code
  • Added support for multiple versions of WinUI, including the upcoming WinUI3.
Complete list of changes
  • #406: AdditionalInterface param can add bad IDL import statements
  • #433: Fix for #406
  • #426: LottieViewer UI improvements for AnimatedIcon
  • #427: Convert to modern null checking now that it works in .NET Native.
  • #429: Fix some missing simplifications in Composition expressions.
  • #428: Fix inaccuracy in the UAP version info comment.
  • #425: Show frame numbers in generated code.
  • #424: Fixes for AnimatedIcon
  • #421: Show another decimal place on the LottieViewer tooltip.
  • #420: Pin a version of Cake to work around Cake change that broke the build
  • #416: Fix bug in the Select method for non-animatable animatables.
  • #415: Adjust the set of things that are built for different configurations.
  • #413: Create a project just for the animatables.
  • #411: Expose animation metadata in generated code
  • #412: Add WinUI 2.6 animated icon support.
  • #408: Show gradient brushes in DGML.
  • #407: Improvements for CppWinrt on Win32.
  • #404: Add: version checking for Blur effect, path information for error message.
  • #403: Eliminate the default value checks from ConvertTo class.
  • #400: Translates Lottie blur effects to Composition.
  • #398: Add C++ implementations of the GaussianBlurEffect class.
  • #399: Support a Gaussian blur effect field that sometimes shows up.
  • #397: Add GuassianBlurEffect to WinCompData.
  • #395: Changes to successfully package and upload beta app to the store.
  • #394: Validate marker names.
  • #393: Parse After Effects blur effects from Lottie files.
  • #392: Implement DropShadow effect.
  • #390: Add support for LayerVisual and DropShadow Composition types. Cleanup.
  • #388: Start version 7.1.
  • #389: Revert "Start version 7.1. (#388)"
  • #386: Don't pretend to handle drop shadows yet.
  • #385: Add animation to the Play/Stop button in Lottie Viewer.
  • #382: Replace -winui3mode with -winuiversion.
  • #381: Update docs to stop referencing MyGet.
  • #380: Add a new build configuration for a Beta version of LottieViewer.
  • #379: Fix crash on some cases of path groups.
  • #378: Cleanup: remove redundant type tags.
  • #377: Parse layer effects.
  • #376: Support .lottie files in LottieGen.
  • #375: Show the current UAP version in Lottie Viewer.
  • #374: Allow external images to be loaded, and add .lottie file support
  • #372: Cleanup resulting from enabling nullables.
  • #370: Code cleanup: take advantage of C# 8 features.
  • #371: Fix codegen errors.
  • #369: Make the control panels use transitions to slide in and slide out.
  • #368: Expose overload of SetSourceAsync that takes a stream.
  • #366: LottieVisualSource - allow for SetSourceAsync(string json)
  • #367: Generate a way to convert between marker names and progress values, a…
  • #365: Add ability to specify additional interfaces for the generated code.
  • #363: Fully enable nullables.
  • #364: Go back to using latest .NET 3.1 SDK.
  • #361: Enable nullable reference types where possible.
  • #360: Simplifications around image loading, and C++ generated code cleanup.
  • #359: Fixes a hole in the GraphCompactor optimizer wrt visiblity and masks.
  • #358: Fix rendering issue caused by hole in the optimizer.
  • #357: Cppwinrt-consistent file naming
  • #356: Fix 2 bugs - path translation optimizer, cppwinrt codegen.
  • #354: Get image layer working with cppwinrt.
  • #352: Start on cppwinrt codegen for IDynamicAnimatedVisualSource.
  • #350: Improvements to the CppWinrt code generator.
  • #345: Report expression operation counts.
  • #346: Change the default for IsAnimatedVisualSourceDynamic.
  • #332: LottieViewer: UI for color palette editing, and show marker values in info panel.
  • #343: Show animator counts in the object status table in generated code.
  • #342: Prevent double periods in LP0002 error message.
  • #341: Allow JSON to be loaded from any stream, including memory
  • #333: Load animation from memory
  • #339: Invalidated IAnimatedVisual on image loading completed, even if it failed.
  • #338: Fix the namespace for IGeometrySource2D.
  • #337: Refactor to allow better modularization of the translator.
  • #336: Renaming of some methods that return booleans for clarity.
  • #331: Add a WinUI3 mode to LottieGen.
  • #335: Stay on .NET SDK 3.1.302. An upgrade to 3.1.401 broke the build.
  • #326: Fix translation of rectangles with RoundCorners.
  • #318: Adding markers to the scrubber.
  • #329: Got some feedback from someone using this README for the first time.
  • #330: Improve naming of the _lottieFilePath field in LottieFileProcessor.
  • #328: CX classes stopped compiling because it wasn't public. Make it public.
  • #327: Do not include paths or machine info in generated code.
  • #325: Fix TrimmedAnimatable null reference exception.
  • #324: Fix issue with C++ multi-version support.
  • #321: Use clearer names for automatically generated color bindings.
  • #319: Replace ReadOnlySpan with IReadOnlyList.
  • #316: Add display of markers to Lottie Viewer.
  • #315: Recognize animation subchannels when discovering non-default properties.
  • #313: Eliminate the ReadOnlySpan from Sequence.
  • #314: Fix rare case name collision in generated code.
  • #312: Support animated vector2/vector3 with easings that differ between channels
  • #311: Improve accessibility of lottie viewer
  • #309: Add ability to automatically bind to the colors in a Lottie's palette.
  • #310: Improve accessibility of sample app
  • #308: Convert animated paths to static paths with animated offset if possible
  • #307: Ignore the "ml2" field in Lottie files.
  • #305: Stop using CompositionRectangleGeometry
  • #303: Fix: LottieGen was not creating constants for scalar theme properties.
  • #301: Include the offset in the name of a gradient stop.
  • #299: Update the version of nuget.
  • #298: Ignore the "meta" field in Lottie files.
  • #284: Multi dimensional easing
  • #297: Remove the ability to output XML from LottieGen.
  • #296: The test for whether an image was embedded or not was not quite right…
  • #294: Prevent duplicated keyframe progress
  • #295: Use null-coalescing compound assignment for caches.
  • #292: Merge the v6.1.0 release to master and start v7.0.0
  • #293: Update samples to use 6.1.0 NuGet of LottieGen.

v6.1.0

3 years ago

This release brings a new theme property binding feature, better Lottie feature support, performance improvements and bug fixes.

Theme property binding

This feature enables properties in Lottie files to be bound to values at runtime. This enables scenarios such as synchronizing colors in your Lottie file to the Windows theme colors.

Theme property binding was developed to support fill color binding, however it also supports StrokeWidth and opens the door to enabling other property bindings.

To make an After Effects color fill bound to a property at runtime, the name of the fill needs to include (CSS-like) syntax such as the following: "{color:var(Foreground)}". This will create a property in the generated code called "Foreground".

Property binding default values are exposed as constants. This allows these default values to be used in supporting code without having to instantiate the IAnimatedVisualSource object.

The ColorAsVector4(…) method in generated code is to help developers set color properties. Due to a limitation of the Windows.UI.Composition APIs, we can't use the Windows.UI.Xaml.Color type for doing property binding. We use Vector4 instead and this method ensures the conversion from color to Vector4 is done the same way by developers as is expected by generated code.

Lottie feature support

  • Handle opacity and color animated on the same element.

Code generation

  • Rich generated comments about the Lottie contents, and the code generation.

    • We now generate comments that identify the version of the tool, when it was run, the input file, the command line arguments, etc., etc., so that it's easier to keep track of how the file was generated, and to regenerate with identical options when the Lottie file changes.
    • We generate various tables in the comments to help developers understand the contents of the generated file. These include information about markers, and counts of some important objects. Object counts are useful for determining whether a change to a Lottie file may have regressed performance.
  • New code generation options.

    • Added "-Namespace" option to put the generated code into a user's namespace.
    • Added "-Public" switch to generate public classes. Generated code defaults to internal, but can be overridden with this switch.
    • Added "-TestMode" switch to generate code that doesn't change given the same inputs (e.g. no timestamps are included in the output). Used for regression testing.
  • Code quality improvements.

    • Abstracted common patterns (e.g. creating a shape and setting its fill) into methods. This results in smaller code that is easier to read.
    • Canonicalize progress remapping variables. These are the "t1", "t2", etc. variables that are used to support spatial Beziers. Canonicalizing can reduce the number of variables (and their associated costs).
    • Use "Visual.IsVisible" property for visibility control. This was previously not possible due to requirements to run downlevel (where this property was not available).
    • Use "CompositionShape.Scale" for visibility on shapes instead of TransformMatrix. This generates more efficient code and enables more optimizations.
    • Gradient stop optimization. After Effects does not remove redundant gradient stops, and simple gradients often have a redundant "middle" gradient stop. We can now detect and remove redundant gradient stops.
    • Eliminate redundant "Position" animations.
    • Compact expression strings to save some bytes.
    • Readability improvements for generated code.
    • Method naming improvements.
    • Matrices now have comments explaining what they do.
  • C++/WinRT

    • Limited support for C++/WinRT. This is enough support to satisfy the needs of some Microsoft teams, but should not be considered general support yet. Bug reports are welcome though and we will work towards full support.

Metadata handling

  • Added a general metadata facility for all CompositionObjects. This allows arbitrary data to be passed through the translator. It is used for Lottie metadata (e.g. markers), property binding, object names, and object descriptions.

Parser performance

  • Removed dependency on the Newtonsoft JSON parser. We now use the System.Text.Json parser. Parsing performance improved ~50%.
  • Parsing is more resilient to malformed and invalid Lottie files.

Lottie Viewer

  • Remove support for code generation from the Lottie Viewer tool. Code generation can now only be done by the LottieGen.exe tool. This is so we can add lots of options to the code generator without complicating the Lottie Viewer UI. It also means there is only one way to generate code, which allows for more repeatable code generation in production environments.

Bug fixes

  • Prevent use of PathKeyFrameAnimations before UAP v11. PathKeyFrameAnimations are unreliable on earlier versions and may result in a crash.
  • Miter limit on strokes was being calculated incorrectly.
  • Rounded rectangle roundness was being calculated incorrectly.

v6.0.0

4 years ago
  • platforms & tooling :rocket:

  • improvements

    • Support for common radial gradient fills. - Simeon (PR)
    • Enable more linear gradient fill cases, including animated linear gradients. - Simeon (PR)
    • Enable image layer with external and embedded image assets. - plaiMS (PR)
    • Handling Opacity on Layers. - Simeon (PR)
    • Multi-shape mask and matte translation - eliezerpMS (PR)
  • other fixes

    • Adding some of the pieces needed for supporting image assets - Simeon (PR)
    • Fixes a bug with the generated CX code when it uses geometry groups. … - Simeon (PR)
    • Adding a new project UIData to reference WinUIXamlMediaData. - plaiMS (PR)
    • Enable VisualSurface now that we are using the 1903 SDK. - Simeon (PR)
    • Override the default interpolation color space of ColorKeyFrameAnimation to align with After Effects - Simeon (PR)
    • Prepare for gradients - Simeon (PR)
    • Enabling simple LinearGradientFill cases. - Simeon (PR)
    • Updated comment on CompositeVisuals - eliezerpMS (PR)
    • Add support for Effects without Win2d for Cpp/Cx - eliezerpMS (PR)
    • CodeGen IDynamicAnimatedVisualSource for composition with LoadedImageSurface. - plaiMS (PR)
    • Make the generated CX classes public. This allows them to be used in XAML - Simeon (PR)
    • Fixing incorrect (didn't compile) CX codegen for geometry groups. - Simeon (PR)
    • Clip precomps with the correct size. - Simeon (PR)
    • Fix for issue 117. During translation, don't pass the layer around wh… - Simeon (PR)
    • Small refactoring to simplify and share code for creating shape visual - Simeon (PR)
    • Setting Opacity transforms on layer. - plaiMS (PR)
    • Fix issue 117 -- Create new context for the layer being processed. - plaiMS (PR)
    • Add parsing for blend mode (bm) on ShapeLayerContent. - Simeon (PR)
    • Add data representation of IRandomAccessStream for use by LoadedImage… - Simeon (PR)
    • Adding pieces in Translator, ObjectGraph, Optimizer, Instantiator to support embedded images in LottieVisualSource. - plaiMS (PR)
    • Move the YAML object model so UIData can use it. - Simeon (PR)
    • Fix a comment typo. - Simeon (PR)
    • Adding first pieces needed in LottieToWinCompTranslator to enable image layer. - plaiMS (PR)
    • Refactoring code that references WinUIXamlMediaData and WinCompData to UIData. - plaiMS (PR)
    • Include LottieYaml outputs in the tests. - Simeon (PR)
    • Ensure node names don't conflict with type names for C++. - Simeon (PR)
    • CX codegen fixes - Simeon (PR)
    • Handle AnimatedVisuals where different versions need different parameters. - Simeon (PR)
    • Optimize calls to CompositionVisualSurface.SourceOffset and .SourceSize. - Simeon (PR)
    • Anti-alias the edges of masks and mattes for a smoother result. - Simeon (PR)
    • Add Scott as a code owner so he gets on the CR list for each PR. - Simeon (PR)
    • The (perhaps) final part of version-dependent code generation. - Simeon (PR)
    • Update nuget dependencies to latest non-prerelease versions. - Simeon (PR)
    • Fix for #161: Ensure storage is allocated for the root node in codegen. - Simeon (PR)
    • Define a more sensible sorting order for elements in codegen - Simeon (PR)
    • Prerequisites for versioning. - Simeon (PR)
    • Versioning stage 2. Translate multiple times to support multiple UAP versions. - Simeon (PR)
    • Refactor codegen to output multiple versions. - Simeon (PR)
    • Add metadata to the WinCompData types to indicate at which UAP versio… - Simeon (PR)
    • We were turning off opacity incorrectly in the case of masks on ShapeLayer. - Simeon (PR)
    • Remove class name option - Simeon (PR)
    • Give more info in the gradient fill issue messages. - Simeon (PR)
    • Improve many masks cases, especially combinations of Add and Subtract… - Simeon (PR)
    • Better stats for LottieGen - Simeon (PR)
    • Harden against some unexpected cases in Lottie json files. - Simeon (PR)
    • More updates to LT pages - sohchatt (PR)