Giter VIP home page Giter VIP logo

lottieui's People

Contributors

lmoreton avatar mcrich23 avatar tfmart 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

Watchers

 avatar

Forkers

lmoreton mcrich23

lottieui's Issues

Progress/Framerate observer Lottie's new Core Animation engine

As of Lottie 4.0, the current solution we have for observing animations with CVDisplayLink and CADisplayLink have stopped working when rendering animations with their new Core Animation engine.

For now, we can use the legacy Main Thread engine to use the framerate/progress observers, but we'll have to sort it out what's causing the display link to break on the newer engine

If anyone has an possible solution in mind, feel free to discuss it below. You're also very welcome to contribute with a pull request!

Build failing for macOS target

After just adding the package and building my macOS target it's failing with this build error. Could it be because of the syntax in lottie-ios's RenderingEngineOption.swift? Some Swift version incompatibility maybe. My environment is on Swift 5.9(swiftlang-5.9.0.128.108 clang-1500.0.40.1). Is there a recommended Swift version to use with LottieUI?

ld: Undefined symbols:
  enum case for Lottie.LottieContentMode.scaleAspectFit(Lottie.LottieContentMode.Type) -> Lottie.LottieContentMode, referenced from:
      LottieUI.WrappedAnimationNSView.init(animation: Lottie.LottieAnimation?, provider: Lottie.AnimationImageProvider?) -> LottieUI.WrappedAnimationNSView in LottieUI.o
      LottieUI.WrappedAnimationNSView.update(withEngine: Lottie.RenderingEngineOption) -> () in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.realtimeAnimationFrame.getter : CoreGraphics.CGFloat, referenced from:
      closure #1 @Swift.MainActor () -> () in LottieUI.AnimationProgressObserver.(tick in _385C634819DA2085EAADFB3078ACC442)() -> () in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.realtimeAnimationProgress.getter : CoreGraphics.CGFloat, referenced from:
      closure #1 @Swift.MainActor () -> () in LottieUI.AnimationProgressObserver.(tick in _385C634819DA2085EAADFB3078ACC442)() -> () in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.configuration.getter : Lottie.LottieConfiguration, referenced from:
      LottieUI.WrappedAnimationNSView.renderingEngine.getter : Lottie.RenderingEngineOption in LottieUI.o
      LottieUI.WrappedAnimationNSView.renderingEngine.setter : Lottie.RenderingEngineOption in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.imageProvider.getter : Lottie.AnimationImageProvider, referenced from:
      LottieUI.WrappedAnimationNSView.update(withEngine: Lottie.RenderingEngineOption) -> () in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.animationSpeed.getter : CoreGraphics.CGFloat, referenced from:
      LottieUI.WrappedAnimationNSView.speed.getter : CoreGraphics.CGFloat in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.animationSpeed.setter : CoreGraphics.CGFloat, referenced from:
      LottieUI.WrappedAnimationNSView.speed.setter : CoreGraphics.CGFloat in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.setValueProvider(_: Lottie.AnyValueProvider, keypath: Lottie.AnimationKeypath) -> (), referenced from:
      LottieUI.WrappedAnimationNSView.setValueProvider(_: Lottie.AnyValueProvider?, keypath: Lottie.AnimationKeypath?) -> () in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.backgroundBehavior.getter : Lottie.LottieBackgroundBehavior, referenced from:
      LottieUI.WrappedAnimationNSView.backgroundBehavior.getter : Lottie.LottieBackgroundBehavior in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.backgroundBehavior.setter : Lottie.LottieBackgroundBehavior, referenced from:
      LottieUI.WrappedAnimationNSView.backgroundBehavior.setter : Lottie.LottieBackgroundBehavior in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.play(completion: ((Swift.Bool) -> ())?) -> (), referenced from:
      LottieUI.WrappedAnimationNSView.play(completion: ((Swift.Bool) -> ())?) -> () in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.play(fromFrame: CoreGraphics.CGFloat?, toFrame: CoreGraphics.CGFloat, loopMode: Lottie.LottieLoopMode?, completion: ((Swift.Bool) -> ())?) -> (), referenced from:
      LottieUI.WrappedAnimationNSView.play(fromFrame: CoreGraphics.CGFloat, toFrame: CoreGraphics.CGFloat, loopMode: Lottie.LottieLoopMode, _: ((Swift.Bool) -> ())?) -> () in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.stop() -> (), referenced from:
      LottieUI.WrappedAnimationNSView.stop() -> () in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.loopMode.getter : Lottie.LottieLoopMode, referenced from:
      LottieUI.WrappedAnimationNSView.loopMode.getter : Lottie.LottieLoopMode in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.loopMode.setter : Lottie.LottieLoopMode, referenced from:
      LottieUI.WrappedAnimationNSView.loopMode.setter : Lottie.LottieLoopMode in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationView.animation.getter : Lottie.LottieAnimation?, referenced from:
      LottieUI.WrappedAnimationNSView.update(withEngine: Lottie.RenderingEngineOption) -> () in LottieUI.o
  dispatch thunk of Lottie.LottieAnimationViewBase.contentMode.setter : Lottie.LottieContentMode, referenced from:
      LottieUI.WrappedAnimationNSView.init(animation: Lottie.LottieAnimation?, provider: Lottie.AnimationImageProvider?) -> LottieUI.WrappedAnimationNSView in LottieUI.o
      LottieUI.WrappedAnimationNSView.update(withEngine: Lottie.RenderingEngineOption) -> () in LottieUI.o
  enum case for Lottie.LottieBackgroundBehavior.pause(Lottie.LottieBackgroundBehavior.Type) -> Lottie.LottieBackgroundBehavior, referenced from:
      variable initialization expression of LottieUI.LottieConfiguration.(_backgroundBehavior in _3788E42FFA4BE53E59FCB330C0655D1F) : Combine.Published<Lottie.LottieBackgroundBehavior> in LottieUI.o
      LottieUI.LottieConfiguration.init() -> LottieUI.LottieConfiguration in LottieUI.o
  enum case for Lottie.LottieLoopMode.loop(Lottie.LottieLoopMode.Type) -> Lottie.LottieLoopMode, referenced from:
      closure #1 (LottieUI.AsyncLottiePhase) -> SwiftUI._ConditionalContent<SwiftUI._ConditionalContent<SwiftUI.Text, SwiftUI.Text>, LottieUI.LottieView> in static LottieUI.SwiftUIView_Previews.previews.getter : some in LottieUI.o
  enum case for Lottie.LottieLoopMode.playOnce(Lottie.LottieLoopMode.Type) -> Lottie.LottieLoopMode, referenced from:
      variable initialization expression of LottieUI.LottieConfiguration.(_loopMode in _3788E42FFA4BE53E59FCB330C0655D1F) : Combine.Published<Lottie.LottieLoopMode> in LottieUI.o
      LottieUI.LottieConfiguration.init() -> LottieUI.LottieConfiguration in LottieUI.o
  enum case for Lottie.DecodingStrategy.dictionaryBased(Lottie.DecodingStrategy.Type) -> Lottie.DecodingStrategy, referenced from:
      default argument 1 of Lottie.LottieConfiguration.init(renderingEngine: Lottie.RenderingEngineOption, decodingStrategy: Lottie.DecodingStrategy, colorSpace: __C.CGColorSpaceRef, reducedMotionOption: Lottie.ReducedMotionOption) -> Lottie.LottieConfiguration in LottieUI.o
  enum case for Lottie.RenderingEngineOption.automatic(Lottie.RenderingEngineOption.Type) -> Lottie.RenderingEngineOption, referenced from:
      variable initialization expression of LottieUI.LottieConfiguration.(_renderingEngine in _3788E42FFA4BE53E59FCB330C0655D1F) : Combine.Published<Lottie.RenderingEngineOption> in LottieUI.o
      LottieUI.LottieConfiguration.init() -> LottieUI.LottieConfiguration in LottieUI.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Add support for observers for macOS

Currently, the Mac version of LottieView do not support observation of the current progress/frame rate of an animation. For the iOS counterpart, I'm using CADisplayLink to observe the animation, but unfortunately it's not available on AppKit.

If anyone has any suggestion on how I could keep track of the animation's progress on macOS, feel free to let me know! You're also welcome to contribute with a pull request with your implementation if you're feeling extra generous.

Thanks for your help!

Possibility to bind animation name

Hey would it be possible to sort bind the animation name?

I want to use Lotties on my onboarding screen, where if the user presses next a new animation shows and starts playing center screen.

Hope to hear from you soon!

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.