Giter VIP home page Giter VIP logo

lottieuwp's Introduction

LottieUWP

Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile!

This library is a port from the Java code to support the Universal Windows Platform (UWP). For the official Lottie-Windows project, go here: https://aka.ms/lottie

Download

UWP: NuGet Badge

MyGet: https://www.myget.org/F/azchohfi/api/v3/index.json

For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. They say a picture is worth 1,000 words so here are 13,000:

Example1

Example2

Example3

Community

Example4

All of these animations were created in After Effects, exported with Bodymovin, and rendered natively with no additional engineering effort.

Bodymovin is an After Effects plugin created by Hernan Torrisi that exports After effects files as json and includes a javascript web player. We've built on top of his great work to extend its usage to Android, iOS, and React Native.

Read more about it on our blog post Or get in touch on Twitter (gpeal8) or via [email protected]

Sample App

The sample app includes some built in animations.

Using Lottie for UWP

LottieUWP supports Windows Build 10586+ (November Update) and above. The simplest way to use it is with LottieAnimationView:

<Page 
    ...
    xmlns:lottieUwp="using:LottieUWP"
    ...
    />
    <lottieUwp:LottieAnimationView 
        FileName="Assets/Gears.json"
        RepeatCount="-1"
        AutoPlay="True"
        VerticalAlignment="Center"
        HorizontalAlignment="Center"/>
</Page>

Or you can load it programatically in multiple ways. From a json asset in app/src/main/assets:

await animationView.SetAnimationAsync("Assets/hello-world.json");
animationView.RepeatCount = LottieDrawable.Infinite;

This method will load the file and parse the animation in the background and asynchronously start rendering once completed.

If your app is crashing at runtime and you are using Visual Studio, make sure the Build Action for each of your .json files is set to 'Content' and not the default 'None.' To change this, click on the file in the Solution Explorer and change the selection in the dropdown next to 'Build Action' under the 'Advance' header in the properties window.

Note: You may have to redo this if you update the .json depending on how you reimport it.

If you want to reuse an animation such as in each item of a list or load it from a network request JsonObject:

LottieAnimationView.Composition = await LottieComposition.Factory.FromJsonAsync(jsonObject);
LottieAnimationView.PlayAnimation();

You can then control the animation or add event handlers:

animationView.AnimatorUpdate += (object sender, ValueAnimator.ValueAnimatorUpdateEventArgs e) => { ... };
animationView.PlayAnimation();
...
if (animationView.IsAnimating) 
{
    // Do something.
}
...
animationView.Progress = 0.5f;
...
// Custom animation speed or duration.
ValueAnimator animator = ValueAnimator.OfFloat(0f, 1f);
animator.Duration = 500;
animator.Update += (sender, e) => animationView.Progress = e.Animation.AnimatedValue;
animator.Start();
...
animationView.CancelAnimation();

Under the hood, LottieAnimationView uses LottieDrawable to render its animations. If you need to, you can use the the drawable form directly:

LottieDrawable drawable = new LottieDrawable();
var composition = await LottieComposition.Factory.FromAssetFileNameAsync("Assets/hello-world.json");
drawable.SetComposition(composition);

If your animation will be frequently reused, LottieAnimationView has an optional caching strategy built in. Use LottieAnimationView.SetAnimationAsync(string, CacheStrategy). CacheStrategy can be Strong, Weak, or None to have LottieAnimationView hold a strong or weak reference to the loaded and parsed animation.

You can also use the awaitable version of LottieComposition's asynchronous methods:

var composition = await LottieComposition.Factory.FromAssetFileNameAsync(assetName);
..
var composition = await LottieComposition.Factory.FromJsonAsync(jsonObject);
...
var composition = await LottieComposition.Factory.FromInputStreamAsync(stream);

Image Support

You can animate images if your animation is loaded from assets and your image file is in a subdirectory of assets. Just set ImageAssetsFolder on LottieAnimationView or LottieDrawable with the relative folder inside of assets and make sure that the images that bodymovin export are in that folder with their names unchanged (should be img_#). If you use LottieDrawable directly, you must call RecycleBitmaps when you are done with it.

If you need to provide your own bitmaps if you downloaded them from the network or something, you can provide a delegate to do that:

animationView.ImageAssetDelegate = new ImageAssetDelegate();
...
class ImageAssetDelegate : IImageAssetDelegate
{
   public BitmapSource FetchBitmap(LottieImageAsset asset)
   {
       return GetBitmap(asset);
   }
}

Supported After Effects Features

Keyframe Interpolation


  • Linear Interpolation

  • Bezier Interpolation

  • Hold Interpolation

  • Rove Across Time

  • Spatial Bezier

Solids


  • Transform Anchor Point

  • Transform Position

  • Transform Scale

  • Transform Rotation

  • Transform Opacity

Masks


  • Path

  • Opacity

  • Multiple Masks (additive)

Track Mattes


  • Alpha Matte

Parenting


  • Multiple Parenting

  • Nulls

Shape Layers


  • Rectangle (All properties)

  • Ellipse (All properties)

  • Polystar (All properties)

  • Polygon (All properties. Integer point values only.)

  • Path (All properties)

  • Anchor Point

  • Position

  • Scale

  • Rotation

  • Opacity

  • Group Transforms (Anchor point, position, scale etc)

  • Multiple paths in one group

Stroke (shape layer)


  • Stroke Color

  • Stroke Opacity

  • Stroke Width

  • Line Cap

  • Dashes

Fill (shape layer)


  • Fill Color

  • Fill Opacity

Trim Paths (shape layer)


  • Trim Paths Start

  • Trim Paths End

  • Trim Paths Offset

Performance and Memory

  1. If the composition has no masks or mattes then the performance and memory overhead should be quite good. No bitmaps are created and most operations are simple canvas draw operations.
  2. If the composition has mattes, 2-3 bitmaps will be created at the composition size. The bitmaps are created automatically by lottie when the animation view is added to the window and recycled when it is removed from the window. For this reason, it is not recommended to use animations with masks or mattes in a RecyclerView because it will cause significant bitmap churn. In addition to memory churn, additional bitmap.eraseColor() and canvas.drawBitmap() calls are necessary for masks and mattes which will slow down the performance of the animation. For small animations, the performance hit should not be large enough to be obvious when actually used.
  3. If you are using your animation in a list, it is recommended to use a CacheStrategy in LottieAnimationView.setAnimation(String, CacheStrategy) so the animations do not have to be deserialized every time.

Try it out

Clone this repository and run the LottieUWP.Sample module to see a bunch of sample animations. The JSON files for them are located in LottieUWP.Sample/Assets and the orignal After Effects files are located in /After Effects Samples

Community Contributions

Community Contributors

Alternatives

  1. Build animations by hand. Building animations by hand is a huge time commitment for design and engineering across Android and iOS. It's often hard or even impossible to justify spending so much time to get an animation right.
  2. Facebook Keyframes. Keyframes is a wonderful new library from Facebook that they built for reactions. However, Keyframes doesn't support some of Lottie's features such as masks, mattes, trim paths, dash patterns, and more.
  3. Gifs. Gifs are more than double the size of a bodymovin JSON and are rendered at a fixed size that can't be scaled up to match large and high density screens.
  4. Png sequences. Png sequences are even worse than gifs in that their file sizes are often 30-50x the size of the bodymovin json and also can't be scaled up.

Why is it called Lottie?

Lottie is named after a German film director and the foremost pioneer of silhouette animation. Her best known films are The Adventures of Prince Achmed (1926) – the oldest surviving feature-length animated film, preceding Walt Disney's feature-length Snow White and the Seven Dwarfs (1937) by over ten years The art of Lotte Reineger

Contributing

Contributors are more than welcome. Just upload a PR with a description of your changes.

Classes to improve

  • Animator.cs
  • BitmapCanvas.cs
  • ColorFilter.cs
  • DashPathEffect.cs
  • Gradient.cs
  • ImageAssetBitmapManager.cs
  • LinearGradient.cs
  • LottieAnimationView.cs
  • LottieDrawable.cs
  • Paint.cs
  • Path.cs
  • PathEffect.cs
  • PathMeasure.cs
  • PorterDuff.cs
  • PorterDuffXfermode.cs
  • RadialGradient.cs
  • Shader.cs
  • PorterDuffColorFilter.cs
  • ValueAnimator.cs

Other classes may also need changes, but these are the ones that are known to have actionable TODOs.

Issues or feature requests?

File github issues for anything that is unexpectedly broken. If an After Effects file is not working, please attach it to your issue. Debugging without the original file is much more difficult.

lottieuwp's People

Contributors

andrew-mi avatar azchohfi avatar chironexsoftware avatar sohchatt avatar tanayparikh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lottieuwp's Issues

It lost something when I using Win2d render

hi, I am using LottieUWP to develop a new uwp application, and I added a new method in your LottieDrawable class,so it can be rendered by win2d CanvasRenderTarget,but it doesnt work well,it lost something(for the following example its eyes).

I create a repository for display the problem:
https://github.com/HHChaos/LottieUwpTest

Added method in LottieDrawable.cs###

public CanvasCommandList GetCanvasImage(ICanvasResourceCreator resourceCreator, float scaleX, float scaleY)
    {
        lock (this)
        {
            var commandList = new CanvasCommandList(resourceCreator);
            using (var session = commandList.CreateDrawingSession())
            {
                var width = _composition.Bounds.Width * scaleX;
                var height = _composition.Bounds.Height * scaleY;
                if (_bitmapCanvas == null || _bitmapCanvas.Width < width || _bitmapCanvas.Height < height)
                {
                    _bitmapCanvas?.Dispose();
                    _bitmapCanvas = new BitmapCanvas(width, height);
                }

                using (_bitmapCanvas.CreateSession(resourceCreator.Device, (float) width,
                    (float) height, session))
                {
                    _bitmapCanvas.Clear(Colors.Transparent);
                    LottieLog.BeginSection("Drawable.Draw");
                    if (_compositionLayer == null)
                    {
                        return null;
                    }

                    _matrix.Reset();
                    _matrix = MatrixExt.PreScale(_matrix, scaleX, scaleY);
                    _compositionLayer.Draw(_bitmapCanvas, _matrix, _alpha);
                    LottieLog.EndSection("Drawable.Draw");
                }

            }

            return commandList;
        }
    }

Memory leak in BitmapCanvas.DrawPath

Hi Alexandre ,

I'm using your nice port extensively. When having several LottieAnimationView on screen I observed severe memory consumption of my app ( 10 AnimationViews resulting in about 3mb / sec Memory growth). So I dug into the source code and I think I found the issue (though I'm not 100% sure of the root cause).
In BitmapCanvas.DrawPath a Geometry and a Brush get created but never get disposed (after getting handed over to _drawingSession.DrawGeometry respectively _drawingSession.FillGeometry). Please see the following excerpt of BitmapCanvas:

        public void DrawPath(Path path, Paint paint)
        {
            UpdateDrawingSessionWithFlags(paint.Flags);

            _drawingSession.Transform = GetCurrentTransform();

            var geometry = path.GetGeometry(_device);

			var gradient = paint.Shader as Gradient;
			var brush = gradient != null ? gradient.GetBrush(_device, paint.Alpha) : new CanvasSolidColorBrush(_device, paint.Color);
			brush = paint.ColorFilter?.Apply(this, brush) ?? brush;

			if (paint.Style == Paint.PaintStyle.Stroke)
				_drawingSession.DrawGeometry(geometry, brush, paint.StrokeWidth, GetCanvasStrokeStyle(paint));
			else
				_drawingSession.FillGeometry(geometry, brush);

			geometry.Dispose();
			brush.Dispose();
		}

of course this has to be changed to using statements and there are other places where this is applicable, I think (DrawRect for example). What do you think? should I create a pull request for this?

Greetings,
Michael

CPU load

A simple Lottie Animation uses about 3/4% of CPU increasing the number to 5 even with caching we reach more than 30%.
Is there a way to make CPU load smaller?

wpf version

hi is there any wpf version? how i can use it?

Xamarin Forms UWP MainPage Change Throws Exception

When changing the MainPage of the app while an animation view is on screen an InvalidOperationException is thrown. Details below.

Cannot assign a native control without an Element; Renderer unbound and/or disposed. Please consult Xamarin.Forms renderers for reference implementation of OnElementChanged.

at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.SetNativeControl(TNativeElement control)
at Lottie.Forms.UWP.Renderers.AnimationViewRenderer.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()

c1119565-914c-4569-beb4-92d7b1c35e2f

Reproduction Link: https://drive.google.com/open?id=10B2Qhbe4MPyBaOBzn4emdCYmWSDgltBh

Please improve BezLength logic

Hello.
I need to improve performance while playing JSON.
I think below logic takes long time while Draw.
(There is TODO comment also)

Path.cs
internal static double BezLength(float c0X, float c0Y, float c1X, float c1Y, float c2X, float c2Y, float c3X, float c3Y)
{
const double steps = 1000d; // TODO: improve

            var length = 0d;
            float prevPtX = 0;
            float prevPtY = 0;

            for (var i = 0d; i < steps; i++)
            {
                var pt = GetPointAtT(c0X, c0Y, c1X, c1Y, c2X, c2Y, c3X, c3Y, i / steps);

                if (i > 0)
                {
                    var x = pt.X - prevPtX;
                    var y = pt.Y - prevPtY;
                    length = length + Math.Sqrt(x * x + y * y);
                }

                prevPtX = pt.X;
                prevPtY = pt.Y;
            }
            return length;
        }

Please check it.
Thank you.

Bezier curves are getting flattened

It appears LottieUWP is flattening bezier curves to be linear. We were able to verify that the iOS port maintained the curves and could find several references to 'bezier' in the source code. We have not had a chance to test the same animation in Android yet, but noted there was only 1 reference to 'bezier' in the Android code.

Xamarin Forms UWP Null Reference Exception On Navigation

When you navigate from a page playing an animation and go back to that page a null reference exception is thrown.

Com.Airbnb.Xamarin.Forms.Lottie: 2.5.1
LottieUWP: 2.5.1

System.NullReferenceException: Object reference not set to an instance of an object.
at LottieUWP.LottieDrawable.CanvasControlOnDraw(ICanvasAnimatedControl canvasControl, CanvasAnimatedDrawEventArgs args)

51ec6be2-9c86-405a-80fa-d920c53630df

Reproduction project: https://drive.google.com/file/d/184cMHR9icG2NfUvPIwnsKrRDaE6M-D8P/view?usp=sharing

Some crashes when compiled with Native tool chain

When you compile an UWP app with .NET Native tool chain, some lottie files make the library to crash.
For example with the sample app in release mode:

  1. Select Assets\lottiefiles\gradient_animated_background.json
  2. Select another one
  3. Wait one or two seconds => The app crash with the following exception: System.Runtime.InteropServices.InvalidComObjectException: 'Excep_InvalidComObject_NoRCW_Wrapper. For more information, visit http://go.microsoft.com/fwlink/?LinkId=623485'

Another example less explicit:

  1. Select Assets\lottiefiles\download.json
  2. Select another one
  3. Wait one or two seconds => The app crash with the following exception:
    Unhandled exception at 0x766C64A1 (combase.dll) in LottieUWP.Sample.exe: 0xC000027B

So Buggy

I can't even describe the bug, the first file run fine. Then all the rest of my json stop working
It's keep crashing

Changing/Replacing colors

Hi,

first of all: thank you for that great port of lottie. It's coming in very handy for animating icons etc.
One question I have though: The official docs say, for replacing Colors one should use the ...addColorFilter methods. But it seems as if those methods were once a part of LottieUWP's LottieAnimationView but are no more ( http://airbnb.io/lottie/android/colors.html ). How do I change colors then? As I'm having a dark theme and a light theme I would have to have duplicate versions for every animation (one dark, one light).
Thank you very much,
Michael

Build error

Hello.

I happened a build error.

Error log is
Microsoft.Build.Tasks.Git.targets(20,5): error : Unable to locate repository containing directory 'C:\Users\daehor.song\Desktop\LottieUWP-master\LottieUWP-master\LottieUWP'.

Could you know about this error?

Thank you.

Compilation warning: LottieAnimationView.Loop is obsolete

Our project compiles to treat warnings as errors.
When compiling a project using a LottieAnimationView in a XAML view, the compiler shows the warning below:
image
This is reproducible using the sample project on this GitHub page by changing the project Debug settings to treat all warnings as errors.
The property in question is found in LottieAnimationView, line 800.
The documentation for this property refers to the RepeatCount property; would it be feasible to remove usages of the Loop property and replace them with RepeatCount?
Many thanks!

Support for Universal Windows 8.1

I'm trying to use Lottie on UWP 8.1, but unfortunately it requires Win2d.uwp which is not supported on this framework. Is there any other way to use Win2d.win81 instead?

LottieUWP will crash when the EndValue of keyframe is null

LottieUWP will crash when using the lottie file exported by the latest Bodymovin.
The reason for the crash is that the EndValue of some keyframes is null (StartValue is a valid value), I think in this case the EndValue should be considered equal to StartValue instead of throwing an exception.

crash

Here is the file that caused the crash, it works fine on lottiefiles.com.
testlottie.zip

LottieView inside ListView DataTemplate causing random crash

I have a ItemTemplate inside a listview. When loading my data via my ViewModel (3 rows) I receive the foloowing error. This is random and happens maybe 2 out of five times. Visually each animation is further along than the other,

image

Exception Message:
System.Runtime.InteropServices.COMException: Unspecified error

Attempting to close a CanvasActiveLayer that is not top of the stack. The most recently created layer must be closed first.
at System.Runtime.InteropServices.WindowsRuntime.IClosable.Close()
at LottieUWP.LottieDrawable.CanvasControlOnDraw(ICanvasAnimatedControl canvasControl, CanvasAnimatedDrawEventArgs args)

Export animation as a video

Hi,

I'd like to export the animation as a video (eg: mp4), do you think is it possible? Can you provide me some directions on how to do it? thanks

regards

WPF support

Our apps have a lot of dependencies on legacy hardware that prevents us from effectively migrating away from WPF to UWP, but as Lottie users on iOS & Android we'd love to be able to benefit from Lottie end-to-end.

What would be involved in migrating this work over to be compatible with WPF apps? Does it have dependencies on UWP-specific features?

Crash: Attempting to close a CanvasActiveLayer

When showing and hiding a View which contains a LottieAnimationView, the application sometimes crashes giving the error WinRT information: Attempting to close a CanvasActiveLayer that is not top of the stack. The most recently created layer must be closed first.

This happens randomly to me

at System.Runtime.InteropServices.WindowsRuntime.IClosable.Close() at System.Runtime.InteropServices.WindowsRuntime.IClosableToIDisposableAdapter.Dispose() at LottieUWP.LottieDrawable.Draw(CanvasDevice device, BitmapCanvas bitmapCanvas, CompositionLayer compositionLayer, Rect bounds, Single scale, Byte alpha, Matrix3X3 matrix, Double width, Double height, CanvasDrawingSession canvasDrawingSession) at LottieUWP.LottieDrawable.CanvasControlOnDraw(ICanvasAnimatedControl canvasControl, CanvasAnimatedDrawEventArgs args) at Windows.ApplicationModel.Core.UnhandledError.Propagate() at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object sender, UnhandledErrorDetectedEventArgs eventArgs) --- End of stack trace from previous location where exception was thrown --- at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object sender, UnhandledErrorDetectedEventArgs eventArgs)

Animation is not rendered initially when AutoPlay=False

Hi,

the following bug came when updating to the newest version of LottieUWP (2.5.0.365-beta)

When setting AutoPlay=False on LottieAnimationView, at first the view is totally blank. When triggering the animation once, it is subsequently drawn.
Steps to reproduce:

  • take the sample app
  • set AutoPlay=False on LottieAnimationView in MainPage.xaml
  • start sample app
    => animation is shown only when pressing the "Resume/Pause" button

greetings,
Michael

Crash in Microsoft.Graphics.Canvas.dll after navigating from page hosting Lottie

Hello,

We are using json animation files rendered by Lottie. When navigating from the page hosting Lottie there is a crash in Microsoft.Graphics.Canvas.dll.
I have slightly modified Lottie sample to repro the crash. Diff file is attached.
The Lottie assembly changes are to fix build problems on VS2017 and are negligible. The ones in the sample are for the repro.
I have built Microsoft.Graphics.Canvas.dll (MS open source) and realized that although LottieDrawable.UserControl_Unloaded is called when navigating from the page, sometimes CanvasAnimatedControl::Unloaded (inside Microsoft.Graphics.Canvas.dll) is not called right after, and that's when the crash occurs.
Stack trace of the crash is attached too.

Repro steps (after the applying the diff):

  1. Run the LottieUWP.Sample.
  2. After the async code of MainPag.OnNavigatedTo is done Navigate button will be revealed.
  3. Click Navigate and then click Back repeatedly. You'll get the crash after a few times.

Crash steps attached.

diff.txt
StackTrace.txt
LottieCrashSteps.zip

Could you help us understand and resolve this issue?

Thanks
Yakir

Animations aren't playing when deployed to a console

It appears the animations aren't playing when the app is deployed to an Xbox console. We can 'progress through' the animation, but it's not playing smoothly 'hands off' like it does when deployed as a standard desktop UWP. Have we verified this use case works as anticipated?

LottieUWP Animation Not Smooth

I am a fan of lottie and before I only use it with IOS but right now , I am developing an UWP app and I want to try Lottie in my app as well but seem like the animation in UWP is not as Smooth as in IOS. I want to know is there anyway to improve its smoothness ?

Thing to note
I am using the same animation.json in both IOS and UWP.

are these as performant as xaml controls? ( not an issue )

I was just curious as wanted to ask can we and should we use these animations as part of any custom xaml controls or on our xaml pages just as clickable controls or stuff like that? I mean are these animation controls as performant as normal xaml controls? or is there is limit to how many animations should we use in 1 xaml page. the reason of this question is I can see a lot of animations which might be useful in usual uwp apps, like loading animations, hamburger icon animation and stuff like that.

Trim path

We have a trim path drawing circle (about100 blanks)in lottiefiles woking, but loaded from lottieuwp not working, what should I do?
usage_circle.zip

can't pause and set progress value manually

Unspecified error

Attempting to close a CanvasActiveLayer that is not top of the stack. The most recently created layer must be closed first.

at System.Runtime.InteropServices.WindowsRuntime.IClosable.Close()
at LottieUWP.LottieDrawable.Draw(CanvasDevice device, BitmapCanvas bitmapCanvas, CompositionLayer compositionLayer, Rect bounds, Single scale, Byte alpha, Matrix3X3 matrix, Double width, Double height, CanvasDrawingSession canvasDrawingSession)
at LottieUWP.LottieDrawable.CanvasControlOnDraw(ICanvasAnimatedControl canvasControl, CanvasAnimatedDrawEventArgs args)

Build error was happen on LottieUWP 2.6.1

Hello.

I have a question. I happen build error on LottieUWP 2.6.1

[LottieUWP\LottieCompositionFactory.cs]
312 : return await _taskCache[cacheKey].AsAsyncOperation().AsTask(cancellationToken);
320 : await task.AsAsyncOperation().AsTask(cancellationToken);

AsAsyncOperation is not defined in System.Threading.Tasks.Task.

How can I fix this error?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.