Coder Social home page Coder Social logo

Comments (6)

sergiandreplace avatar sergiandreplace commented on July 20, 2024 1

Here the file: https://www.2dimensions.com/a/sergiandreplace/files/flare/golf-hole/preview

But already added keys to the idle animation (making a quick and dirty flag-wave animation)

from flare-flutter.

luigi-rosso avatar luigi-rosso commented on July 20, 2024

Hi @sergiandreplace! Could you share the link to your Flare file?

I think this might be a case of poor documentation on our side. When Flare (in the editor) swaps from one animation to another, it resets all your properties for every object back to their setup state. At runtime (in Flutter) this does not happen as we allow blending animations on top of each other, so the results from one animation will persist unless they are overwritten by another. That means that if you plan to switch between animations, and you expect certain properties to return to their setup value, you'll need to manually key them in your second animation.

This will be clearer when we add support for a state machine that'll let you switch animations directly in Flare so you can preview the fully blended animations and all their various transitions before exporting to Flutter.

from flare-flutter.

luigi-rosso avatar luigi-rosso commented on July 20, 2024

In this case, I suspect you want to key the properties you move in MovingRight in your Idle animation at their setup state. You can do this by adding one keyframe at the start of Idle for each property you change in MovingRight.

In the future we could also explore adding an option to the widget (and the FlareControls controller) to automatically reset the state for you.

from flare-flutter.

sergiandreplace avatar sergiandreplace commented on July 20, 2024

Makes complete sense, that also explains my question on how to "morph" from one animation to another (if I understood correctly, it's just magic 😆 ).

from flare-flutter.

luigi-rosso avatar luigi-rosso commented on July 20, 2024

Regarding the morphing, yes, Flare handles that for you! By default the FlareWidget will mix the incoming animation for 0.1 seconds on top of the previous animation (the previous animation will keep playing too so the mix/morph happens as both animations are changing, which works very well for very dynamic animations when transitioning from say a run to a walk cycle). Furthermore, it works with as many animations mixed on top of each other as you want!

from flare-flutter.

sergiandreplace avatar sergiandreplace commented on July 20, 2024

Great! Nice work guys!

from flare-flutter.

Related Issues (20)

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.