Пример #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));
        }
Пример #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;
 }
Пример #3
0
 AnimatedLottie(
     Skottie skottie,
     Key key           = null,
     Curve curve       = null,
     TimeSpan?duration = null,
     float frame       = 0
     ) : base(key: key, curve: curve, duration: duration)
 {
     _skottie = skottie;
     _frame   = frame;
 }
Пример #4
0
 public AnimatedLottie(
     string path,
     Key key           = null,
     Curve curve       = null,
     TimeSpan?duration = null,
     float frame       = 0
     ) : base(key: key, curve: curve, duration: duration)
 {
     _skottie = new Skottie(Path.Combine(Application.streamingAssetsPath, path));
     _frame   = frame;
 }
Пример #5
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();
 }
Пример #6
0
 public LottiePainter(Skottie skottie, float frame)
 {
     _skottie = skottie;
     _frame   = frame;
 }
Пример #7
0
 public LottieRenderObjectWidget(Skottie anime, float frame)
 {
     _anime    = anime;
     _frame    = frame;
     _duration = anime.duration();
 }
Пример #8
0
 public Lottie(string path, float frame)
 {
     D.assert(path != null);
     _skottie = new Skottie(Path.Combine(Application.streamingAssetsPath, path));
     _frame   = frame;
 }