Closed CoderMaximus closed 4 months ago
Do you want to create your own animations and apply them or do you want me to add new ones?
1st. Can i create my own animation? 2nd. If you may plz add some. BTW i love flet-navigator cuz it is really easier than using flet's built in routing. Thanks
Thanks so much for your support! I don't think it'll be too tricky to add custom animations. I'm planning to release a new version of Flet-Navigator tomorrow (UTC +3:00) with that feature. It would also be great if you could give me some ideas for animations you'd like to see in the navigator.
I recommend a sliding page from right to left when entering a new page and the opposite when going back, flipping tiles is another thing that would be nice, and many more!
def my_animation(control: Control, mult: float, smoothess: float) -> None:
for angle in range(0, randint(80, 140), smoothess + 1):
control.rotate = angle
control.scale = mult
anim = NavigatorAnimation(NavigatorAnimation.CUSTOM, NavigatorAnimation.SMOOTHNESS_10);
anim.set_custom_animation(my_animation)
flet_navigator = VirtualFletNavigator(navigator_animation=anim)
Reimplementation of built-in ROTATION
animation.
What do you think? Isn't it complicated for newcomers?
def my_animation(control: Control, mult: float, smoothess: float) -> None:
control.scale = Scale(scale=control.scale.scale if control.scale else 1)
control.scale.scale += mult * 0.1
anim = NavigatorAnimation(NavigatorAnimation.CUSTOM, NavigatorAnimation.SMOOTHNESS_10);
anim.set_custom_animation(my_animation)
flet_navigator = VirtualFletNavigator(navigator_animation=anim)
Another fun custom animation.
V2.8.5 is released! Implemented custom animations (check documentation), fixed some animation issues, etc. Also I failed to implement sliding page or flipping tiles, because its impossible, here is why:
Stack
.Y
(or P
if we are using HPR
).But its not over thought, you still can implement sliding page via custom animations, see Flet absolute positioning: https://flet.dev/docs/controls/stack/#absolute-positioning-inside-stack
Also FletNavigator is archived, i.e development is halted. But you can still push new issue and ask for help. Good luck!
You can re-open this issue if you want.
Is it possible to add more animations and transitions?