Comments (3)
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.
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.
Hey @Clafou! Sorry for the delay here -- I agree with this proposal and will post a patch soon.
from wave.
Related Issues (20)
- HSL color space interpolation for UIColors
- Reduce minimum deployment target to 12 if possible
- Animation type names conflict with SwiftUI
- Audit/verify support for ProMotion on iPhone HOT 1
- Improve `backgroundColor` animation retargeting
- Block-based animations can create a retain cycle
- Animators in SwiftUI HOT 2
- Non-animated updates shouldn't wait until the next turn of the run loop
- More SwiftUI uses? HOT 2
- Support for non-spring animations? HOT 1
- DisplayLinkProvider preferredFrameRateRange range error HOT 2
- Animation broken on UIViewControllerAnimatedTransitioning HOT 1
- Animation must have a non-nil `value` before starting.
- Unexpected animator state in completion block
- Major wave update
- The documentation website is down. HOT 2
- Ensure springs created with stiffness have correct frequency response and vice versa HOT 1
- macOS version HOT 6
- Support implicit CALayer shadow animations (offset, opacity, radius) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wave.