Git Product home page Git Product logo

Comments (3)

jtrivedi avatar jtrivedi commented on August 26, 2024

Hey @Clafou, I'm glad to hear you're enjoying Wave!

To confirm, the idea you're proposing is that with this flag enabled, any time a property animation's target is changed, it would automatically start, correct? Or is it that the animation would actually continually run, independent of the the current value?

I'm open to this, but would like to understand the benefits/use-case more. It seems that it would just eliminate a call to start, which doesn't seem like a large benefit?

from wave.

Clafou avatar Clafou commented on August 26, 2024

Hi Janum, thanks for the response.

Yes, my suggestion is to make it possible to change target without calling start again. Basically it's about keeping an animation alive rather than allow it to become inactive automatically. It doesn't need to continually run when its target is reached but it needs to resume animating if the target changes again at a later point, until explicitly stopped.

For example, say you have an animation that depends on a scrollview's offset, which the end user controls by swiping. For the client code it makes sense to create a property animation, start it, and simply update target when the scroll offset changes. But because the animation automatically becomes inactive if it ever reaches its target, the client needs to call start each time after (or before?) it updates target, since it doesn't know (or care) if the animation is still active. I can see in the current implementation that there is no cost involved in calling start repeatedly, so there is no problem as long as this remains the case. But for such a property animation my expectation would be to call start only once at initialisation time and then just update target without having to consider the current state of the animation, at least until I call stop or until the animation object deinits.

from wave.

jtrivedi avatar jtrivedi commented on August 26, 2024

Hey @Clafou! Sorry for the delay here -- I agree with this proposal and will post a patch soon.

from wave.

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.