Beispiel #1
0
        public static AnimatedLottie file(string path, Key key = null, Curve curve = null, TimeSpan?duration = null,
                                          float frame          = 0)
        {
            var skottie = new Skottie(Path.Combine(Application.streamingAssetsPath, path));

            duration = duration ?? TimeSpan.FromSeconds(skottie.duration());
            return(new AnimatedLottie(skottie, key, curve, duration, frame));
        }
Beispiel #2
0
 public Lottie(string path, float frame = 0, Size size = null, int round = -1)
 {
     D.assert(path != null);
     _skottie  = new Skottie(Path.Combine(Application.streamingAssetsPath, path));
     _duration = _skottie.duration();
     _round    = round;
     _frame    = frame * _duration;
     _size     = size;
 }
Beispiel #3
0
 public RenderLottie(
     Skottie skottie,
     float?width  = null,
     float?height = null,
     float scale  = 1.0f,
     float frame  = 0
     )
 {
     _width    = width;
     _height   = height;
     _scale    = scale;
     _skottie  = skottie;
     _frame    = frame;
     _duration = skottie.duration();
 }
Beispiel #4
0
 public LottieRenderObjectWidget(Skottie anime, float frame)
 {
     _anime    = anime;
     _frame    = frame;
     _duration = anime.duration();
 }