Open Dolfik1 opened 3 years ago
@TimLariviere Will this still be possible with v2? It seems like an excellent way to work with animations
I still don't know exactly how to incorporate animations in Fabulous. The issue with having functions inside the widgets is that we need to evaluate them all the time because we can't compare functions like we compare values.
This would require a mechanism to synchronize animations to avoid restarting an animation on each update.
It would be great to support animated transitions on changed properties.
The main idea is as follows: when property is changed in
UpdateIncremental
we should check if any transitions is attached to this property. If transition is attached to the property then we should invoke transition callback instead of modifying property value directly.Take a look at small example: